Fix error message when file contains syntax errors.