public function download($reportFile, ReportRequest $reportRequest, $retryInterval = null)
    {
        try {
            $this->waitReady($reportRequest, $retryInterval ?: 0, [
                RequestOptions::SINK => $reportFile,
            ]);
        } catch (\Exception $ex) {
            if (is_file($reportFile) && is_writable($reportFile)) {
                if (false !== $fh = fopen($reportFile, 'w')) {
                    ftruncate($fh, 0);
                    fclose($fh);
                }
            }

            throw $ex;
        }
    }