Make the hadoop.uri check safer