write sync