let write_file file ~content = let out_file = open_out file in try output_string out_file content; close_out out_file with _ -> close_out out_file