check that file exists before trying to move it