main.js debugging