Update error handling in downloading thread