some cleanup in logging