move download file to top level, so can you hack it easily.
remove download_tool from function arguments
remove expired tasks correctly when paging