Apparently you are not using `isdir`