this is always true, right? flow is not a List, so this will never be true. I think you need to store somewhere the latest batch that has been successfully written.