child.stdout.on('data', chunk => {
        stdout += chunk.toString();
        output += chunk.toString();
        process.stdout.write(chunk);
      });