libcap file mode fix