Enhanced the update.sh code