remove duplicates from a file