attempt to improve logging