update index for file save