Replace the console.log by util.puts for synchronous calls