Error handler rewrite to reduce console output.