use correct error reporting method