Template handler: Properly assign and use local file variable.
Module base class: Fix issues with loadTemplate function.