save doc when open doc changes #136