protected function assertDir(string $dir, array $options)
    {
        if (is_dir($dir)) {
            return true;
        }
        
        if (!(bool)($options['optional'] ?? false)) {
            throw new LoadException("Config directory '$dir' doesn't exist");
        }

        return false;
    }