fixed loop around logger