Improve the way IndexWriter save file.