move  command_check_batch into an extra source unit