implement downloading file from server