fixed bug in checking index files more strictly