first stage of using bash -e rather than &&