+let logfd = ref Pervasives.stdout
+let logprint fmt = Printf.fprintf !logfd (fmt ^^ "%!")
+let debprint fmt = if (!debug) then Printf.fprintf !logfd (fmt ^^ "%!")
+let print fmt = Printf.printf (fmt ^^ "%!")
+
+type result = Success | Failed
+type fname_and_fd = string option * Unix.file_descr
+
+(* Relative path, never precededed by a '/' *)