Implemented a better logger.