scantwopermhk: Implement batchsize argument