Only log statement when it's actually executed