protected function save(Configuration $config, ImageInterface $image, $styles)
    {
        $this->createDirectory(array($config->getImage(), $config->getStylesheet()));

        try {
            $image->save($config->getImage(), $config->getOptions());
        } catch (\RuntimeException $e) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException(sprintf('Unable to write file "%s".', $config->getImage()));
            // @codeCoverageIgnoreEnd

        }

        if (false === @file_put_contents($config->getStylesheet(), $styles)) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException(sprintf('Unable to write file "%s".', $config->getStylesheet()));
            // @codeCoverageIgnoreEnd
        }
    }