This needs '-o' to work correctly. Also update the shebang to bash in some scripts as shellcheck was complaining about pipefail not being a POSIX shell thing otherwise.