Added function writeConnectionXml & writeSensorXml