* @param indexFile the input file, plus the index extension
* @return an Index, or null if we're unable to load
*/
protected Index loadFromDisk( final File inputFile, final File indexFile ) {
logger.debug("Loading Tribble index from disk for file " + inputFile);
Index index = IndexFactory.loadIndex(indexFile.getAbsolutePath());
// check if the file is up-to date (filestamp and version check)
if (index.isCurrentVersion() && indexFile.lastModified() >= inputFile.lastModified())
return index;
else if (indexFile.lastModified() < inputFile.lastModified())
logger.warn("Index file " + indexFile + " is out of date (index older than input file), " +
(disableAutoIndexCreation ? "falling back to an in-memory index" : "deleting and updating the index file"));
else // we've loaded an old version of the index, we want to remove it <-- currently not used, but may re-enable