Better catching of errors during urllib2.open