a more robust br-download implementation that supports local files