imporve logging