throw error when file load fails but not when file does not exist