dropping duplictes in the output file