Fix exception in a logging