let write k =
  let ch=formatES k in
  let n = Unix.write file ch 0 (String.length ch) in
if n=0 then print_endline "no output error"