set -o pipefail to fail with right exit status when piping such with tee