handle file download from url