No IIFE needed here.
Use process.std***.write instead of console.log.