Check remote file

Only download remote file if needed.