Add code to check whether network is partitioned