+1000 to the name selection algorithm, but we can override files if we export twice, and we don't know if that's what the user wants.

There is an utility library `/shared/js/device_storage/get_unused_filename.js` that will return a free filename available, depending on the name you pass, adding a suffix to avoid overwriting an exiting file.