Have you considered...
#! /bin/bash -xe
# Prints each line of what will be executed after expansion but before execution
# Exit on any error outside a condition
# -x -e will not work: Everything after the second space is considered a single word
#! /bin/bash -xe
# Prints each line of what will be executed after expansion but before execution
# Exit on any error outside a condition
# -x -e will not work: Everything after the second space is considered a single word