added error highlighting in generator