Today I was looking at exactly this code and I don't get why do we need this check in the first place. I wonder if it wouldn't be better to simply remove the if-then-log logic altogheter...