externalize the remote file check