Add error reporting.