let check_extension path ext = 
    let (real_path, real_ext) = split_extension path
    in
    ext = real_ext