Minor fixes to bash code
Adds 'set -e' all around
Stores more info in 'status' file