Improve reporting of error messages.