updated error reporting