let fail_if_unix_error f x = try f x with Unix.Unix_error (e,s1,s2) -> failwith ((Unix.error_message e)^": "^s1^" "^s2)