Completes stats reporting, including catching undefined variables