Added network monitoring code