public function setFormat($format)
    {
        if ($format) {
            $format = strtolower($format);

            if (!in_array($format, static::$validFormats)) {
                throw new Exception("Format {$format} is not supported");
            }

            $this->format = $format;

            if (!$this->suffix) {
                $this->setSuffix(".{$format}");
            }
        }

        return $this;
    }