change to allow downloading files that are bigger than heap size (e.g.
large movie)