private function openZip($path)
    {
        $zip = new \ZipArchive();
        if (!$zip->open($path, \ZipArchive::CREATE)) {
            throw new IOException('Cannot create zip file');
        }

        return $zip;
    }