delete index files in the closing stream phase (LSHandler.closeStream function) instead of immediately