Refactored Logger