improve spin_up_deployment.sh robustness