Better error messages and fix index.js finding.