Add logging of any errors.