Fix saving last index time and move to the end of index just in case it doesn't complete properly