improved error messages during parse