improved logging for close_group