handle case where duplicate filenames could exist