Improve error reporting.