Use process.stdout instead of console.log