private function buildFile():int
    {
        $mercure = $this->analysis();
        $mercurefinal = array();
        if ($this->clear() != 1) {
            throw new Server500(new \ArrayObject(array("explain" => "Cannot clear Routing JS File",
                "solution" => "Please check the Routing JS file")));
        }
        while ($mercure->valid()) {
            array_push($mercurefinal, $mercure->current());
            $mercure->next();
        }

        return ($this->write(json_encode((object)$mercurefinal, JSON_PRETTY_PRINT)));
    }