docs: def download(self, output_dir, url, overwrite):
          """ Dowload file to /tmp """
          tmp = self.url2tmp(output_dir, url)
          if os.path.isfile(tmp) and not overwrite:
              logging.info("File {0} already exists. Skipping download.".format(tmp))
              return tmp
          f = open(tmp, 'wb')
          logging.info("Downloading {0}".format(url))
          res = requests.get(url, stream=True)
          if res.status_code != 200:
              # failed to download, cleanup and raise exception
              f.close()
              os.remove(tmp)
              error = "{0}\n\nFailed to download < {0} >".format(res.content, url)
              raise IOError(error)
          for block in res.iter_content(1024):
              f.write(block)
          f.close()
          return tmp