added better logging pt2