added download file func