Use explicit variable declaration for Template variables.
Collect stats and print summary after all hosts have been processed.