moved log statement