Why the check for indexFile?