`var demoTemplateFile = htmlDemoTemplate || path.join(__dirname, 'templates/demo.html');` — would be simpler.