Update so that the script exits with errors if various commands fail