typo: there is not `$dir` param