Just moving this above the `fs.readdir` as part of the merge to protect against exceptions.