modified error reporting