let get_extension x = try let pos = String.rindex x '.' in String.after x (pos + 1) with Not_found -> ""