fix: don't throw the error if directory is wrong and `ignoreInvalid: true`