write upgrading before pre upgrade