add conditions for index files that exist but are empty.