Improved error reporting.