Added autowrite