This would need de-MTL'ing.
We have a process that builds up lots and lots of matrices row by row.
- Each matrix has a header which accessed where it's needed via Reader
- We don't want to write to some of the files but not all, because that's probably a bug (ie. we've missed a row in one of the matrices)
- We track the number of lines written in State
- We error out when the lines don't match.
The calling code calls appendAll
a bunch of times for different sub-groups of matrices, and then checkFileWritingConsistency
after doing all the sub-groups.