added robust download of text