file utils for ocaml