pipefail causing problems