private function write($body) {
    if (!$this->file_handle) {
      return false;
    }

      $content = json_encode($body);
    $content.= "\n";

    return fwrite($this->file_handle, $content) == strlen($content);
  }