Correction - Handles trailing empty line at connectedInterfaces

This updated proposed patch was tested with more than 1 active interface