private static function log($data) {
        if (!$data) {
            $data = new \stdClass();
            $data->ua = self::$ua;
        } 
        $jsonData = json_encode($data);
        echo $jsonData."\r\n";
        //$fp = fopen(__DIR__."/log/user_agents.log", "a");
        //fwrite($fp, $jsonData."\r\n");
        //fclose($fp);
    }