Add a few more debug messages (logging.debug)
Avoid blocking the PIPE on windows