fixed Powershell errors detection