I have this simple script that just gets path an verifies if it exists.

```
function getPaths(){

        $pathFromCMS = Read-Host "Please set the path for the copy files"
        $pathToCMS = Read-Host "Please set the path to your CMS application"

        if ((Test-Path -Path $pathFromCMS ) -and (Test-Path -Path $pathToCMS )){
            Return $True
        }
        else{
            [System.Windows.MessageBox]::Show('You have provided wrong path!')
            Return $False
        }
}
do{}while (! (getPaths) -eq $True)

echo "Hello there"

```

The problem is with the MessageBox::Show function. It somehow makes the loop stop when entering wrong paths. When I change it just for Write-Host "You have provided wrong path!" everything works fine. Can someone explain why this happens pls ?