Print message and exit on errors.