Add try catch for URL inputstream