Added filetype detection for cargo.