error logging improvement