We can use the `stat.isDirectory()` func now