Update index.js

also handle baseDir in CustomFileLoader