We also need to write some state that notes what we have finished batchID.