backup changes before rewrite