imanos wrote:
i don't want to create new file and write the old one again
Why not? Just create a temporary file with the new list of wanted words, rename the original first file, and rename the temporary file to the original name of the first file...