downloadfiles() definition.