Display error message on failure and exit.
Fixed typo.