closeAndSave should only delete if temporary