You Need A Standalone Reindex Program
You need to be able to reindex from a standalone program that runs outside your main program. If you cannot load your main program due to a bad index file, you cannot reindex. You cannot run your program.
It is important that the standalone program reads the existing cdx files to get the actual index tag names and index expressions in use. From time to time a programmer will create an index manually and not include that in the re-index program. This can create chaos.
If a cdx file gets corrupted, you need a standalone re-index program.
If too many records have been added to a table, you can get intermittent failures to find a record. It must be re-indexed.