Fixed bench.sh to detect errors