Finish the batch download function