Fixed stdout problem on windows