Minor Fix on rotate store file logic