Karthik,
The directory origin assumes files show up atomically and ready for ingestion (fully written and closed). This typically is achieved by a move or writing to a temp file and then doing a rename when done (which is also a move).
If you are receiving the same file more than once, you could be in the scenario that you are processing the file when it is 'replaced' by the new one and that would lead to processing corruption.
Avoiding this scenario is not easy because your pipeline could be stopped for some reason.
If you append to your files names the upload timestamp then you would have unique file names and things would work as expected.
thx