Fix variable logging statistics outputting on every include