bugfix no more duplicated headers, we read old 1st

...and then write all at once. I am getting a duplicate row though.
Remove duplicate lines from a file, works!