add set autowrite