Add support for more comprehensive error messages