public function setDestination($destination)
{
$this->destination = $destination;
if (is_dir($destination)) {
throw new FetchException('The file could not be written to ' . $destination . '. Directory exists.');
}
$this->createDir($destination);
$this->fp = fopen($destination, 'wb');
if (!$this->fp) {
throw new FetchException('The file could not be written to ' . $destination);
}
}