# File lib/dister/downloader.rb, line 49
    def on_failure
      begin
        unless code == 'Curl::Err::CurlOKNo error'
          @pbar.finish
          STDOUT.flush
          raise "Download failed with error code: #{code}"
        end
      ensure
        @file.close
      end
    end