fix when file path is invalid.