improve logging feature again