in reply to Removing lines from a file.

This might not help much - but might it have to do with where you have your line breaks in the file?