correct an error on logger call finally