Added exits on errors.