better error messages during parsing