changed download file method