Fix a bug --- Discarding duplicate input files