Your script runs fine on my machine.
In reply to Re: Issue with Threads while collecting command output by BrowserUk in thread Issue with Threads while collecting command output by pavan6754