Adding logging feature