moving log statement to aid debugging