work on error reporting