improved log formatting