move pipefail from bash invocation to set to be more robust/make work