Fixed the bug where the test output was scrambled in multithreaded mode
Fixed Windows bug where stdout and stderr weren't disabled in multithreaded mode