fixed error: now properly creates file and also warns user if they would like to override an existing file if the file name already exists.