only use custom error handler if debug level is 3 - setting to new 4 would not work