final public static function session_write_close()
    {
        if ( !self::$started ) return;

        if (self::$handler) {
            self::$handler->write(self::$id, self::session_encode());
            self::$handler->close();
        }

        self::$started = false;
        file_put_contents(self::$file, self::session_encode());
    }