It turns out fs recognizes the trailing slash as a directory
Deep dived looking for EISDIR but drowing in C