Error message also sent when file does not exist