adding log statement in getter