Setting -o pipefail

also removing some blank lines