handle exceptions only in main download function