report better errors during compilation