Modifying upgrade script