change error reporting method