openfileとかopen_outとかopen_out_genとか色々あるので混乱する。
let file = Sys.argv.(1) in
let f = try open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_text] 0o600 file
with Sys_error msg -> failwith ("Couldn't write to " ^ msg) in
output_string f "OCaml\n";close_out f;;