Added open-uri error checking