Corrected 'Write-Host' with 'Write-Output' for logging