Logging fix, add missing 'extend' in index.js