now the write file saves a backup before it begins to overwrite file