So you want to keep a comment asking a question, despite the fact I answered it, because there might be another answer or question which you can't really describe?

How do you imagine that is that useful documentation in the code?  This code skims through the file, so once someone figures out that much the fact you reset the file back to the beginning is hardly surprising to need a rewind.  If there should have been any documentation it should have been describing WHY all that is done at the beginning since that took a while to figure out.  Not to say you don't know why you have to go back to the beginning once done - which has at least one extremely obvious reason.