MODE-2285 Corrected how the index providers are written out prior to shutting down