sync writing