Update xb-restore.sh

order of operations