added URISyntaxException handling