display errors and exit