Update main.js
Implemented output settings as suggested by amolgkulkarni