Terminate consistently on error