code: function dumpLog(type, peripheralId, serviceUuid, uuid, data ){
  
      var dumpFile=dumpPath + '/' + peripheralId + '.log';
  
      if (servicesLookup[serviceUuid]) {
        var serviceName = servicesLookup[serviceUuid].name;
        var characteristicName = servicesLookup[serviceUuid].characteristics[uuid].name;      
      }
  
      var toSave = getDateTime() + ' | ' + type + ' | ' + serviceUuid;
      if (serviceName) { toSave += ' (' + serviceName + ')'; };
      toSave += ' | ' + uuid;
      if (characteristicName) { toSave += ' (' + characteristicName + ')';  };
      toSave += ' | ' + data.toString('hex') + ' (' + utils.hex2a(data.toString('hex'))+ ')\n';
  
      fs.appendFile(dumpFile, toSave, function(err) {
        if(err) {
            return console.log(err);
        }
      })
  }
docs: dump transmission log to file