get_locked_file_path(): new function