Dumping duplicates to file