modify download file func