Support batch mode.