private function modeFile($msg, $verboseLvl, $insertNewline, $dump, $error)
    {
        $handle = @fopen($this->filePath, 'a+');
        if ($this->verbose >= $verboseLvl) {
            if ($dump !== false) {
                fwrite($handle, '<fieldset style="margin-top:10pt;font-family:'.self::FONT_FAMILY.';"><legend style="font-weight:bold;">'.$msg.'</legend>'.cwsDump($dump, false).'</fieldset>');
            } elseif ($error !== false) {
                fwrite($handle, '<span style="font-family:'.self::FONT_FAMILY.';color:#CC0000">ERROR: '.$error.'</span>');
            } elseif (!empty($msg)) {
                fwrite($handle, '<span style="font-family:'.self::FONT_FAMILY.';">'.$msg.'</span>');
            }
            if ($insertNewline) {
                fwrite($handle, "<br />\n");
            }
        }
        fclose($handle);
    }