check for existence of remote file before creating it