clean up error reporting