took out Write-Log function and replaced with Start-Transcript