Hi Ardalan,
I think the problem is your FileGuids, all the guid save as the same value, so it try to save the same file multiple times.
Debug the foreach loop, check the first guid, second guid, is the same guid?
Regards,
Ken