One thing of note here is you are not closing the PartyText file once you read it.
You should close it as soon as it has been read into the system.

Notice the way I coded the file routines to open, read, close the files.