Added save and restore custom index