logging improvement