add auto dir change & auto save
merge fixed