Probably a good idea to spit out a output line every time you do a batch.  And, yeah, like I said earlier, it'll have to be upserts or query, pick rows to change, then update.  And insert, I guess.