Greatly enhance the flash_partition.sh script