add some logging to index.js