hacked autosaving of the index on each write