generate file without duplicates