updated the script for upgrading the firmware