Implemented the logging and error handling framework