improve logging control, fix group bug