Added parser error handling