Added support for local index.json and made getResource as async