code cleanup: reorder log statement