sin writefile