improvements to batch dl function