$lang_path = $path . '/' . $lang;
if (!is_dir($lang_path)) {
    mkdir($lang_path, FX_DIR_PERMISSIONS);
}
if (COption::GetOptionString('fileman', "use_separeted_dics", "Y") == "Y") {
    $user_path = $lang_path . '/' . $USER->GetID();
    if (!is_dir($user_path)) {
        mkdir($user_path, FX_DIR_PERMISSIONS);
    }
    $path = $user_path;
} else {
    $path = $lang_path;
}
if (is_dir($path)) {
    $SC->init($lang, 2, $use_pspell, $use_custom_spell, $path, PSPELL_FAST, $path . "/custom.pws");
    $SC->checkArr($wordList);
    $node = '';
    foreach ($SC->wrongWordArr as $resultElement) {
        $node .= '<el>';
        $node .= '<ind>' . $resultElement[0] . '</ind>';
        if (!$resultElement[1]) {
            $node .= '<sug>none</sug>';
        } else {
            $node .= '<sug>';
            foreach ($resultElement[1] as $suggestion) {
                $node .= $suggestion . ',';
            }
            $node = substr($node, 0, -1);
            $node .= '</sug>';
        }
        $node .= '</el>';