Enhanced the logger