Update main.js

added log to the main controller