write upgrade_post_check.sh script