fix file dupes problem when adding a file with the same name