improved error detection and reporting of the front-end