check if file exists before trying to send