Add maxBatch option for batch mode