Handle exceptions when downloading