Exit if something goes wrong.