exit with non-zero status if there are any errors