public function remove($host)
    {
        $this->validHost($host);

        if (!$this->check($host)) {
            throw new \RuntimeException('Host does not exists in the file');
        }

        $this->backup();

        $tmpFilePath = $this->filepath.'.tmp';

        $tmpFile = new \SplFileObject($tmpFilePath, 'w+');

        $this->file->rewind();

        while (!$this->file->eof()) {
            $pattern = '/\b'.$host.'\b/i';
            if (!preg_match($pattern, $this->file->current())) {
                $tmpFile->fwrite($this->file->current());
            }
            $this->file->next();
        }

        copy($tmpFilePath, $this->filepath);
        unlink($tmpFilePath);

        return true;
    }