Updated ScriptTemplate.ps1

Fixed logging bug that was wiping out entire log file at end of script.