Get unique original input file name before file delete


I have a requirement where I need to split batch input xml and process it and at the end delete the input batch xml from the directory.
Everything is working but at the end since it is creating multiple xml and I do a join to get original input xml. pipeline fails because file delete happens after first splitted flow and it fails after 2nd split as it doesn’t find any file to delete.
How to avoid it, I tried putting unique snap before file delete but did not work. I tried group by fields but no luck.

@Sahil I am not sure how you design your pipeline, but just for quick fix the deletion issue, you can choose the below option in your File delete snap. One more thing, Unique will only remove those duplicate record if all set of attribute are same. So better if you have only concerns about filename, then add one mapper before unique and only map exact file name to delete. Then it should discard duplicate filename.