Fixed exception capturing for URL downloading