support download file function from url,remove unnessary codes,fix some bugs