Display error message on failure and exit.