add support for empty index.txt