moved freeing of file pointer to end of last processed reads file sectio...

...n