Refactored Logger class