Added filtering to remove non json files from processing in the indices loop