use try/catch for creating URI objects

a single port with a failure shouldn't kill the entire run