Error handling in web-reading functions