Improve logging lib