fixed the error reporting class