I'd prefer a solution that does not use ensureRange.  EnsureRange throws an exception when any pieces are missing so any function that calls makeSubstream must now handle this exception. Would it be enough to just fire of a request for all the missing chunks?