Fix "file not found" detection when a remote file is read