Fixed process output streams to write in a new thread