Fixed downloading files from streams directly