$ErrorActionPreference = "Continue"
try {
    & "$PSScriptRoot\target\debug\ts-native.exe" "$PSScriptRoot\test_find.ts" 2>&1 | ForEach-Object { $_.ToString() } | Out-File "$PSScriptRoot\compile_out.txt" -Encoding utf8
    & "$PSScriptRoot\test_find.exe" 2>&1 | ForEach-Object { $_.ToString() } | Out-File "$PSScriptRoot\run_out.txt" -Encoding utf8
} catch {
    $_.ToString() | Out-File "$PSScriptRoot\error_out.txt" -Encoding utf8
}