Well, so feel free to post some code you are using, so we can help you on that one, as its only guessing right now.
And NO, please don't post the full code, as the processing of the files content isn't the problem, but the rest of your script :-)
Have a nice day All decision is left to your taste