Add error reporting