Return filename instead of remote_name when file not cached. Caller can then easily compare provided path to returned value to know if the file was cached.