Write out changes to disk