improve logging system