Fix to downloadfiles error handling.