added option to overwrite file in export to file on disk.