Remove infinite loop in logging