fail the script if there are errors along the way

@ericjungu