Rewrote the ErrorHandler class to a Logger class.