Check if file exists before trying to upload.