Adding ErrorHandler class