Replace deprecated sys.puts with console.log, resolve #1529