recoding write file