add console feature for index.js