moved error reporting into class ErrorReporter