correct determination of the size of a record in chunked-write