moved downloadfile to httpclient