made all error reporting compile conditionally