Rewrite update script