private Index loadIndex(String path) { try { String indexFile = Tribble.indexFile(path); Index index = null; if (ParsingUtils.resourceExists(indexFile)) { index = IndexFactory.loadIndex(indexFile); } else { // See if the index itself is gzipped indexFile = ParsingUtils.appendToPath(indexFile, ".gz"); if (ParsingUtils.resourceExists(indexFile)) { index = IndexFactory.loadIndex(indexFile); } } return index; } catch (IOException e) { log.error("Error loading index file", e); return null; } }