improve logging feature