Handle exceptions on reading URL