Add a check for zero-length index files