dynamically find an index file