catch urlopen exceptions