More reliability enhancements to deploy.ps1