added set -e to linux and mac output files