diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 2951a2f..61ce8dc 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -928,7 +928,7 @@
 	device := dh.device
 	if device == nil {
 		/*TODO: needs to handle error scenarios */
-		logger.Error("Failed to fetch handler device")
+		logger.Errorw("Failed to fetch handler device", log.Fields{"device-id": dh.deviceID})
 		e.Cancel(err)
 		return
 	}
@@ -1201,7 +1201,7 @@
 	if pMibUlFsm != nil {
 		if pMibUlFsm.Is(ulStDisabled) {
 			if err := pMibUlFsm.Event(ulEvStart); err != nil {
-				logger.Errorw("MibSyncFsm: Can't go to state starting", log.Fields{"err": err})
+				logger.Errorw("MibSyncFsm: Can't go to state starting", log.Fields{"deviceId": dh.deviceID, "err": err})
 				return fmt.Errorf("can't go to state starting: %s", dh.deviceID)
 			}
 			logger.Debugw("MibSyncFsm", log.Fields{"state": string(pMibUlFsm.Current())})
@@ -1209,12 +1209,12 @@
 			//Determine if this ONU has ever synchronized
 			if true { //TODO: insert valid check
 				if err := pMibUlFsm.Event(ulEvResetMib); err != nil {
-					logger.Errorw("MibSyncFsm: Can't go to state resetting_mib", log.Fields{"err": err})
+					logger.Errorw("MibSyncFsm: Can't go to state resetting_mib", log.Fields{"deviceId": dh.deviceID, "err": err})
 					return fmt.Errorf("can't go to state resetting_mib: %s", dh.deviceID)
 				}
 			} else {
 				if err := pMibUlFsm.Event(ulEvExamineMds); err != nil {
-					logger.Errorw("MibSyncFsm: Can't go to state examine_mds", log.Fields{"err": err})
+					logger.Errorw("MibSyncFsm: Can't go to state examine_mds", log.Fields{"deviceId": dh.deviceID, "err": err})
 					return fmt.Errorf("can't go to examine_mds: %s", dh.deviceID)
 				}
 				logger.Debugw("state of MibSyncFsm", log.Fields{"state": string(pMibUlFsm.Current())})
@@ -1225,7 +1225,8 @@
 				// Event(ulEvMismatch)
 			}
 		} else {
-			logger.Errorw("wrong state of MibSyncFsm - want: disabled", log.Fields{"have": string(pMibUlFsm.Current())})
+			logger.Errorw("wrong state of MibSyncFsm - want: disabled", log.Fields{"have": string(pMibUlFsm.Current()),
+				"deviceId": dh.deviceID})
 			return fmt.Errorf("wrong state of MibSyncFsm: %s", dh.deviceID)
 		}
 	} else {
@@ -1403,20 +1404,21 @@
 	if pMibDlFsm != nil {
 		if pMibDlFsm.Is(dlStDisabled) {
 			if err := pMibDlFsm.Event(dlEvStart); err != nil {
-				logger.Errorw("MibDownloadFsm: Can't go to state starting", log.Fields{"err": err})
+				logger.Errorw("MibDownloadFsm: Can't go to state starting", log.Fields{"deviceId": dh.deviceID, "err": err})
 				// maybe try a FSM reset and then again ... - TODO!!!
 			} else {
 				logger.Debugw("MibDownloadFsm", log.Fields{"state": string(pMibDlFsm.Current())})
 				// maybe use more specific states here for the specific download steps ...
 				if err := pMibDlFsm.Event(dlEvCreateGal); err != nil {
-					logger.Errorw("MibDownloadFsm: Can't start CreateGal", log.Fields{"err": err})
+					logger.Errorw("MibDownloadFsm: Can't start CreateGal", log.Fields{"deviceId": dh.deviceID, "err": err})
 				} else {
 					logger.Debugw("state of MibDownloadFsm", log.Fields{"state": string(pMibDlFsm.Current())})
 					//Begin MIB data download (running autonomously)
 				}
 			}
 		} else {
-			logger.Errorw("wrong state of MibDownloadFsm - want: disabled", log.Fields{"have": string(pMibDlFsm.Current())})
+			logger.Errorw("wrong state of MibDownloadFsm - want: disabled", log.Fields{"have": string(pMibDlFsm.Current()),
+				"deviceId": dh.deviceID})
 			// maybe try a FSM reset and then again ... - TODO!!!
 		}
 		/***** Mib download started */
diff --git a/internal/pkg/onuadaptercore/mib_download.go b/internal/pkg/onuadaptercore/mib_download.go
index 95a406d..74881f8 100644
--- a/internal/pkg/onuadaptercore/mib_download.go
+++ b/internal/pkg/onuadaptercore/mib_download.go
@@ -19,7 +19,7 @@
 
 import (
 	"context"
-	"errors"
+	"fmt"
 	"time"
 
 	"github.com/looplab/fsm"
@@ -149,17 +149,17 @@
 		{
 			msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeCreateResponse)
 			if msgLayer == nil {
-				logger.Error("Omci Msg layer could not be detected for CreateResponse")
+				logger.Errorw("Omci Msg layer could not be detected for CreateResponse", log.Fields{"device-id": onuDeviceEntry.deviceID})
 				return
 			}
 			msgObj, msgOk := msgLayer.(*omci.CreateResponse)
 			if !msgOk {
-				logger.Error("Omci Msg layer could not be assigned for CreateResponse")
+				logger.Errorw("Omci Msg layer could not be assigned for CreateResponse", log.Fields{"device-id": onuDeviceEntry.deviceID})
 				return
 			}
 			logger.Debugw("CreateResponse Data", log.Fields{"device-id": onuDeviceEntry.deviceID, "data-fields": msgObj})
 			if msgObj.Result != me.Success {
-				logger.Errorw("Omci CreateResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
+				logger.Errorw("Omci CreateResponse Error - later: drive FSM to abort state ?", log.Fields{"device-id": onuDeviceEntry.deviceID, "Error": msgObj.Result})
 				// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
 				return
 			}
@@ -197,17 +197,18 @@
 		{
 			msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeSetResponse)
 			if msgLayer == nil {
-				logger.Error("Omci Msg layer could not be detected for SetResponse")
+				logger.Errorw("Omci Msg layer could not be detected for SetResponse", log.Fields{"device-id": onuDeviceEntry.deviceID})
 				return
 			}
 			msgObj, msgOk := msgLayer.(*omci.SetResponse)
 			if !msgOk {
-				logger.Error("Omci Msg layer could not be assigned for SetResponse")
+				logger.Errorw("Omci Msg layer could not be assigned for SetResponse", log.Fields{"device-id": onuDeviceEntry.deviceID})
 				return
 			}
 			logger.Debugw("SetResponse Data", log.Fields{"device-id": onuDeviceEntry.deviceID, "data-fields": msgObj})
 			if msgObj.Result != me.Success {
-				logger.Errorw("Omci SetResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
+				logger.Errorw("Omci SetResponse Error - later: drive FSM to abort state ?", log.Fields{"device-id": onuDeviceEntry.deviceID,
+					"Error": msgObj.Result})
 				// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
 				return
 			}
@@ -229,7 +230,8 @@
 		} //SetResponseType
 	default:
 		{
-			logger.Errorw("Rx OMCI MibDownload unhandled MsgType", log.Fields{"omciMsgType": msg.OmciMsg.MessageType})
+			logger.Errorw("Rx OMCI MibDownload unhandled MsgType", log.Fields{"device-id": onuDeviceEntry.deviceID,
+				"omciMsgType": msg.OmciMsg.MessageType})
 			return
 		}
 	} // switch msg.OmciMsg.MessageType
@@ -247,7 +249,8 @@
 		//verify response
 		err := onuDeviceEntry.waitforOmciResponse(meInstance)
 		if err != nil {
-			logger.Error("InitialBridgeSetup failed at MBSP, aborting MIB Download!")
+			logger.Errorw("InitialBridgeSetup failed at MBSP, aborting MIB Download!",
+				log.Fields{"device-id": onuDeviceEntry.deviceID})
 			_ = onuDeviceEntry.pMibDownloadFsm.pFsm.Event(dlEvReset)
 			return
 		}
@@ -259,7 +262,8 @@
 		//verify response
 		err = onuDeviceEntry.waitforOmciResponse(meInstance)
 		if err != nil {
-			logger.Error("InitialBridgeSetup failed at MBPCD, aborting MIB Download!")
+			logger.Errorw("InitialBridgeSetup failed at MBPCD, aborting MIB Download!",
+				log.Fields{"device-id": onuDeviceEntry.deviceID})
 			_ = onuDeviceEntry.pMibDownloadFsm.pFsm.Event(dlEvReset)
 			return
 		}
@@ -271,7 +275,8 @@
 		//verify response
 		err = onuDeviceEntry.waitforOmciResponse(meInstance)
 		if err != nil {
-			logger.Error("InitialBridgeSetup failed at EVTOCD, aborting MIB Download!")
+			logger.Errorw("InitialBridgeSetup failed at EVTOCD, aborting MIB Download!",
+				log.Fields{"device-id": onuDeviceEntry.deviceID})
 			_ = onuDeviceEntry.pMibDownloadFsm.pFsm.Event(dlEvReset)
 			return
 		}
@@ -289,7 +294,7 @@
 	// 		logger.Info("MibDownload-bridge-init message reception canceled", log.Fields{"for device-id": onuDeviceEntry.deviceID})
 	case <-time.After(30 * time.Second): //3s was detected to be to less in 8*8 bbsim test with debug Info/Debug
 		logger.Warnw("MibDownload-bridge-init timeout", log.Fields{"for device-id": onuDeviceEntry.deviceID})
-		return errors.New("mibDownloadBridgeInit timeout")
+		return fmt.Errorf("mibDownloadBridgeInit timeout %s", onuDeviceEntry.deviceID)
 	case success := <-onuDeviceEntry.omciMessageReceived:
 		if success {
 			logger.Debug("MibDownload-bridge-init response received")
@@ -297,6 +302,6 @@
 		}
 		// should not happen so far
 		logger.Warnw("MibDownload-bridge-init response error", log.Fields{"for device-id": onuDeviceEntry.deviceID})
-		return errors.New("mibDownloadBridgeInit responseError")
+		return fmt.Errorf("mibDownloadBridgeInit responseError %s", onuDeviceEntry.deviceID)
 	}
 }
diff --git a/internal/pkg/onuadaptercore/mib_sync.go b/internal/pkg/onuadaptercore/mib_sync.go
index eef2f70..a2015bc 100644
--- a/internal/pkg/onuadaptercore/mib_sync.go
+++ b/internal/pkg/onuadaptercore/mib_sync.go
@@ -149,7 +149,7 @@
 
 			var fistLevelMap map[string]interface{}
 			if err = json.Unmarshal(mibTmpBytes, &fistLevelMap); err != nil {
-				logger.Error("MibSync FSM - Failed to unmarshal template", log.Fields{"error": err, "device-id": onuDeviceEntry.deviceID})
+				logger.Errorw("MibSync FSM - Failed to unmarshal template", log.Fields{"error": err, "device-id": onuDeviceEntry.deviceID})
 			} else {
 				for fistLevelKey, firstLevelValue := range fistLevelMap {
 					logger.Debugw("MibSync FSM - fistLevelKey", log.Fields{"fistLevelKey": fistLevelKey})
@@ -184,7 +184,8 @@
 			logger.Debugw("No MIB template found", log.Fields{"path": path, "device-id": onuDeviceEntry.deviceID})
 		}
 	} else {
-		logger.Errorf("Get from kvstore operation failed for path %s", path)
+		logger.Errorf("Get from kvstore operation failed for path",
+			log.Fields{"path": path, "device-id": onuDeviceEntry.deviceID})
 	}
 	if meStoredFromTemplate {
 		logger.Debug("MibSync FSM - valid MEs stored from template")
@@ -292,15 +293,16 @@
 					_ = onuDeviceEntry.pMibUploadFsm.pFsm.Event(ulEvGetVendorAndSerial)
 					return
 				}
-				logger.Errorw("Omci MibResetResponse Error", log.Fields{"Error": msgObj.Result})
+				logger.Errorw("Omci MibResetResponse Error", log.Fields{"deviceId": onuDeviceEntry.deviceID, "Error": msgObj.Result})
 			} else {
-				logger.Error("Omci Msg layer could not be assigned")
+				logger.Errorw("Omci Msg layer could not be assigned", log.Fields{"deviceId": onuDeviceEntry.deviceID})
 			}
 		} else {
-			logger.Error("Omci Msg layer could not be detected")
+			logger.Errorw("Omci Msg layer could not be detected", log.Fields{"deviceId": onuDeviceEntry.deviceID})
 		}
 	} else {
-		logger.Errorw("Omci MibResetResponse received", log.Fields{"in state ": onuDeviceEntry.pMibUploadFsm.pFsm.Current})
+		logger.Errorw("Wrong Omci MibResetResponse received", log.Fields{"in state ": onuDeviceEntry.pMibUploadFsm.pFsm.Current,
+			"deviceId": onuDeviceEntry.deviceID})
 	}
 	logger.Info("MibSync Msg", log.Fields{"Stopped handling of MibSyncChan for device-id": onuDeviceEntry.deviceID})
 	_ = onuDeviceEntry.pMibUploadFsm.pFsm.Event(ulEvStop)
@@ -310,12 +312,12 @@
 func (onuDeviceEntry *OnuDeviceEntry) handleOmciMibUploadResponseMessage(msg OmciMessage) {
 	msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeMibUploadResponse)
 	if msgLayer == nil {
-		logger.Error("Omci Msg layer could not be detected")
+		logger.Errorw("Omci Msg layer could not be detected", log.Fields{"deviceId": onuDeviceEntry.deviceID})
 		return
 	}
 	msgObj, msgOk := msgLayer.(*omci.MibUploadResponse)
 	if !msgOk {
-		logger.Error("Omci Msg layer could not be assigned")
+		logger.Errorw("Omci Msg layer could not be assigned", log.Fields{"deviceId": onuDeviceEntry.deviceID})
 		return
 	}
 	logger.Debugw("MibUploadResponse Data for:", log.Fields{"deviceId": onuDeviceEntry.deviceID, "data-fields": msgObj})
@@ -324,7 +326,7 @@
 	if onuDeviceEntry.PDevOmciCC.uploadSequNo < onuDeviceEntry.PDevOmciCC.uploadNoOfCmds {
 		_ = onuDeviceEntry.PDevOmciCC.sendMibUploadNext(context.TODO(), ConstDefaultOmciTimeout, true)
 	} else {
-		logger.Error("Invalid number of commands received for:", log.Fields{"deviceId": onuDeviceEntry.deviceID, "uploadNoOfCmds": onuDeviceEntry.PDevOmciCC.uploadNoOfCmds})
+		logger.Errorw("Invalid number of commands received for:", log.Fields{"deviceId": onuDeviceEntry.deviceID, "uploadNoOfCmds": onuDeviceEntry.PDevOmciCC.uploadNoOfCmds})
 		//TODO right action?
 		_ = onuDeviceEntry.pMibUploadFsm.pFsm.Event(ulEvTimeout)
 	}
@@ -332,9 +334,10 @@
 
 func (onuDeviceEntry *OnuDeviceEntry) handleOmciMibUploadNextResponseMessage(msg OmciMessage) {
 	msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeMibUploadNextResponse)
+
 	//TODO: temporary change due to VOL-3532
 	// if msgLayer == nil {
-	// 	logger.Error("Omci Msg layer could not be detected")
+	// 	logger.Errorw("Omci Msg layer could not be detected", log.Fields{"deviceId": onuDeviceEntry.deviceID})
 	// 	return
 	// }
 	if msgLayer != nil {
@@ -376,9 +379,7 @@
 				if msgObj.EntityClass == onuDeviceEntry.PDevOmciCC.pLastTxMeInstance.GetClassID() && msgObj.EntityInstance == entityID {
 					meAttributes := msgObj.Attributes
 					meInstance := onuDeviceEntry.PDevOmciCC.pLastTxMeInstance.GetName()
-					if onuDeviceEntry.mibDebugLevel == "VERBOSE" {
-						logger.Debugf("MibSync FSM - GetResponse Data for %s", log.Fields{"deviceId": onuDeviceEntry.deviceID, "data-fields": msgObj}, meInstance)
-					}
+					logger.Debugf("MibSync FSM - GetResponse Data for %s", log.Fields{"deviceId": onuDeviceEntry.deviceID, "data-fields": msgObj}, meInstance)
 					switch meInstance {
 					case "OnuG":
 						onuDeviceEntry.vendorID = fmt.Sprintf("%s", meAttributes["VendorId"])
@@ -436,23 +437,21 @@
 					}
 				}
 			} else {
-				logger.Errorw("Omci GetResponse Error", log.Fields{"Error": msgObj.Result})
+				logger.Errorw("Omci GetResponse Error", log.Fields{"deviceId": onuDeviceEntry.deviceID, "Error": msgObj.Result})
 			}
 		} else {
-			logger.Error("Omci Msg layer could not be assigned for GetResponse")
+			logger.Errorw("Omci Msg layer could not be assigned for GetResponse", log.Fields{"deviceId": onuDeviceEntry.deviceID})
 		}
 	} else {
-		logger.Error("Omci Msg layer could not be detected for GetResponse")
+		logger.Errorw("Omci Msg layer could not be detected for GetResponse", log.Fields{"deviceId": onuDeviceEntry.deviceID})
 	}
 	logger.Info("MibSync Msg", log.Fields{"Stopped handling of MibSyncChan for device-id": onuDeviceEntry.deviceID})
 	_ = onuDeviceEntry.pMibUploadFsm.pFsm.Event(ulEvStop)
 }
 
 func (onuDeviceEntry *OnuDeviceEntry) handleOmciMessage(msg OmciMessage) {
-	if onuDeviceEntry.mibDebugLevel == "VERBOSE" {
-		logger.Debugw("MibSync Msg", log.Fields{"OmciMessage received for device-id": onuDeviceEntry.deviceID,
-			"msgType": msg.OmciMsg.MessageType})
-	}
+	logger.Debugw("MibSync Msg", log.Fields{"OmciMessage received for device-id": onuDeviceEntry.deviceID,
+		"msgType": msg.OmciMsg.MessageType, "msg": msg})
 	//further analysis could be done here based on msg.OmciMsg.Payload, e.g. verification of error code ...
 	switch msg.OmciMsg.MessageType {
 	case omci.MibResetResponseType:
@@ -467,6 +466,9 @@
 	case omci.GetResponseType:
 		onuDeviceEntry.handleOmciGetResponseMessage(msg)
 
+	default:
+		log.Warnw("Unknown Message Type", log.Fields{"msgType": msg.OmciMsg.MessageType})
+
 	}
 }
 
diff --git a/internal/pkg/onuadaptercore/omci_ani_config.go b/internal/pkg/onuadaptercore/omci_ani_config.go
index 0103788..4669751 100644
--- a/internal/pkg/onuadaptercore/omci_ani_config.go
+++ b/internal/pkg/onuadaptercore/omci_ani_config.go
@@ -19,7 +19,6 @@
 
 import (
 	"context"
-	"errors"
 	"fmt"
 	"strconv"
 	"time"
@@ -550,12 +549,14 @@
 func (oFsm *uniPonAniConfigFsm) handleOmciAniConfigCreateResponseMessage(msg OmciMessage) {
 	msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeCreateResponse)
 	if msgLayer == nil {
-		logger.Error("Omci Msg layer could not be detected for CreateResponse")
+		logger.Errorw("Omci Msg layer could not be detected for CreateResponse",
+			log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 		return
 	}
 	msgObj, msgOk := msgLayer.(*omci.CreateResponse)
 	if !msgOk {
-		logger.Error("Omci Msg layer could not be assigned for CreateResponse")
+		logger.Errorw("Omci Msg layer could not be assigned for CreateResponse",
+			log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 		return
 	}
 	logger.Debugw("CreateResponse Data", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
@@ -588,17 +589,20 @@
 func (oFsm *uniPonAniConfigFsm) handleOmciAniConfigSetResponseMessage(msg OmciMessage) {
 	msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeSetResponse)
 	if msgLayer == nil {
-		logger.Error("UniPonAniConfigFsm - Omci Msg layer could not be detected for SetResponse")
+		logger.Errorw("UniPonAniConfigFsm - Omci Msg layer could not be detected for SetResponse",
+			log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 		return
 	}
 	msgObj, msgOk := msgLayer.(*omci.SetResponse)
 	if !msgOk {
-		logger.Error("UniPonAniConfigFsm - Omci Msg layer could not be assigned for SetResponse")
+		logger.Errorw("UniPonAniConfigFsm - Omci Msg layer could not be assigned for SetResponse",
+			log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 		return
 	}
 	logger.Debugw("UniPonAniConfigFsm SetResponse Data", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
 	if msgObj.Result != me.Success {
-		logger.Errorw("UniPonAniConfigFsm - Omci SetResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
+		logger.Errorw("UniPonAniConfigFsm - Omci SetResponse Error - later: drive FSM to abort state ?",
+			log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "Error": msgObj.Result})
 		// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
 		return
 	}
@@ -642,7 +646,8 @@
 		} //SetResponseType
 	default:
 		{
-			logger.Errorw("uniPonAniConfigFsm - Rx OMCI unhandled MsgType", log.Fields{"omciMsgType": msg.OmciMsg.MessageType})
+			logger.Errorw("uniPonAniConfigFsm - Rx OMCI unhandled MsgType",
+				log.Fields{"omciMsgType": msg.OmciMsg.MessageType, "device-id": oFsm.pAdaptFsm.deviceID})
 			return
 		}
 	}
@@ -807,7 +812,7 @@
 	// 		logger.Infow("LockState-bridge-init message reception canceled", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
 	case <-time.After(30 * time.Second): //3s was detected to be to less in 8*8 bbsim test with debug Info/Debug
 		logger.Warnw("UniPonAniConfigFsm multi entity timeout", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
-		return errors.New("uniPonAniConfigFsm multi entity timeout")
+		return fmt.Errorf("uniPonAniConfigFsm multi entity timeout %s", oFsm.pAdaptFsm.deviceID)
 	case success := <-oFsm.omciMIdsResponseReceived:
 		if success {
 			logger.Debug("uniPonAniConfigFsm multi entity response received")
@@ -815,6 +820,6 @@
 		}
 		// should not happen so far
 		logger.Warnw("uniPonAniConfigFsm multi entity response error", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
-		return errors.New("uniPonAniConfigFsm multi entity responseError")
+		return fmt.Errorf("uniPonAniConfigFsm multi entity responseError %s", oFsm.pAdaptFsm.deviceID)
 	}
 }
diff --git a/internal/pkg/onuadaptercore/omci_cc.go b/internal/pkg/onuadaptercore/omci_cc.go
index 06458ee..8a02b44 100644
--- a/internal/pkg/onuadaptercore/omci_cc.go
+++ b/internal/pkg/onuadaptercore/omci_cc.go
@@ -23,6 +23,7 @@
 	"encoding/binary"
 	"encoding/hex"
 	"errors"
+	"fmt"
 	"strconv"
 	"sync"
 
@@ -205,23 +206,23 @@
 		}
 	} else {
 		logger.Errorw("received omci-message too small for OmciBaseFormat - abort", log.Fields{"Length": len(rxMsg)})
-		return errors.New("rxOmciMessage too small for BaseFormat")
+		return fmt.Errorf("rxOmciMessage too small for BaseFormat %s", oo.deviceID)
 	}
 
 	packet := gopacket.NewPacket(rxMsg, omci.LayerTypeOMCI, gopacket.NoCopy)
 	if packet == nil {
-		logger.Error("omci-message could not be decoded")
-		return errors.New("could not decode rxMsg as OMCI")
+		logger.Errorw("omci-message could not be decoded", log.Fields{"deviceID": oo.deviceID})
+		return fmt.Errorf("could not decode rxMsg as OMCI %s", oo.deviceID)
 	}
 	omciLayer := packet.Layer(omci.LayerTypeOMCI)
 	if omciLayer == nil {
-		logger.Error("omci-message could not decode omci layer")
-		return errors.New("could not decode omci layer")
+		logger.Errorw("omci-message could not decode omci layer", log.Fields{"deviceID": oo.deviceID})
+		return fmt.Errorf("could not decode omci layer %s", oo.deviceID)
 	}
 	omciMsg, ok := omciLayer.(*omci.OMCI)
 	if !ok {
-		logger.Error("omci-message could not assign omci layer")
-		return errors.New("could not assign omci layer")
+		logger.Errorw("omci-message could not assign omci layer", log.Fields{"deviceID": oo.deviceID})
+		return fmt.Errorf("could not assign omci layer %s", oo.deviceID)
 	}
 	logger.Debugw("omci-message-decoded:", log.Fields{"omciMsgType": omciMsg.MessageType,
 		"transCorrId": strconv.FormatInt(int64(omciMsg.TransactionID), 16), "DeviceIdent": omciMsg.DeviceIdentifier})
@@ -232,8 +233,9 @@
 			return oo.receiveOnuMessage(ctx, omciMsg)
 		}
 		logger.Errorw("Unexpected TransCorrId != 0  not accepted for autonomous messages",
-			log.Fields{"msgType": omciMsg.MessageType, "payload": hex.EncodeToString(omciMsg.Payload)})
-		return errors.New("autonomous Omci Message with TranSCorrId != 0 not acccepted")
+			log.Fields{"msgType": omciMsg.MessageType, "payload": hex.EncodeToString(omciMsg.Payload),
+				"deviceID": oo.deviceID})
+		return fmt.Errorf("autonomous Omci Message with TranSCorrId != 0 not acccepted %s", oo.deviceID)
 
 	}
 	//logger.Debug("RxMsg is a Omci Response Message: try to schedule it to the requester")
@@ -248,8 +250,8 @@
 		oo.mutexRxSchedMap.Unlock()
 	} else {
 		oo.mutexRxSchedMap.Unlock()
-		logger.Error("omci-message-response for not registered transCorrId")
-		return errors.New("could not find registered response handler tor transCorrId")
+		logger.Errorw("omci-message-response for not registered transCorrId", log.Fields{"deviceID": oo.deviceID})
+		return fmt.Errorf("could not find registered response handler tor transCorrId %s", oo.deviceID)
 	}
 
 	return nil
@@ -460,7 +462,7 @@
 			/*TODO: needs to handle error scenarios */
 			logger.Errorw("Failed to fetch device", log.Fields{"err": err, "ParentId": oo.pBaseDeviceHandler.deviceID,
 				"ChildId": oo.deviceID})
-			return errors.New("failed to fetch device")
+			return fmt.Errorf("failed to fetch device %s", oo.deviceID)
 		}
 
 		logger.Debugw("omci-message-sending", log.Fields{"fromDeviceType": oo.pBaseDeviceHandler.DeviceType,
@@ -475,7 +477,7 @@
 			//fromType,toType,toDevId, ProxyDevId
 			oo.pBaseDeviceHandler.DeviceType, oo.pBaseDeviceHandler.ProxyAddressType,
 			oo.deviceID, oo.pBaseDeviceHandler.ProxyAddressID, ""); sendErr != nil {
-			logger.Errorw("send omci request error", log.Fields{"error": sendErr})
+			logger.Errorw("send omci request error", log.Fields{"ChildId": oo.deviceID, "error": sendErr})
 			return sendErr
 		}
 		oo.txQueue.Remove(queueElement) // Dequeue
@@ -545,7 +547,7 @@
 	if oo.pOnuDeviceEntry == nil {
 		logger.Errorw("Abort receiving OMCI response, DeviceEntryPointer is nil", log.Fields{
 			"device-id": oo.deviceID})
-		return errors.New("deviceEntryPointer is nil")
+		return fmt.Errorf("deviceEntryPointer is nil %s", oo.deviceID)
 	}
 
 	// no further test on SeqNo is done here, assignment from rxScheduler is trusted
@@ -612,7 +614,8 @@
 	}
 	err = oo.pOnuDeviceEntry.waitForRebootResponse(responseChannel)
 	if err != nil {
-		logger.Error("aborting ONU Reboot!")
+		logger.Errorw("aborting ONU Reboot!", log.Fields{
+			"Err": err, "device-id": oo.deviceID})
 		_ = oo.pOnuDeviceEntry.pMibDownloadFsm.pFsm.Event("reset")
 		return err
 	}
diff --git a/internal/pkg/onuadaptercore/omci_test_request.go b/internal/pkg/onuadaptercore/omci_test_request.go
index 6449760..c62a4c6 100644
--- a/internal/pkg/onuadaptercore/omci_test_request.go
+++ b/internal/pkg/onuadaptercore/omci_test_request.go
@@ -19,7 +19,7 @@
 
 import (
 	"context"
-	"errors"
+	"fmt"
 
 	//"sync"
 	//"time"
@@ -104,7 +104,7 @@
 	pkt, err := serialize(omci.GetRequestType, request, tid)
 	if err != nil {
 		//omciLogger.WithFields(log.Fields{ ...
-		logger.Errorw("Cannot serialize Onu2-G GetRequest", log.Fields{"Err": err})
+		logger.Errorw("Cannot serialize Onu2-G GetRequest", log.Fields{"device-id": oo.deviceID, "Err": err})
 		return nil, err
 	}
 	// hexEncode would probably work as well, but not needed and leads to wrong logs on OltAdapter frame
@@ -124,7 +124,7 @@
 		logger.Debugw("verify-omci-message-response error", log.Fields{"incorrect TransCorrId": omciMsg.TransactionID,
 			"expected": oo.txSeqNo})
 		oo.verifyDone <- false
-		return errors.New("unexpected TransCorrId")
+		return fmt.Errorf("unexpected TransCorrId %s", oo.deviceID)
 	}
 	if omciMsg.MessageType == omci.GetResponseType {
 		logger.Debugw("verify-omci-message-response", log.Fields{"correct RespType": omciMsg.MessageType})
@@ -132,7 +132,7 @@
 		logger.Debugw("verify-omci-message-response error", log.Fields{"incorrect RespType": omciMsg.MessageType,
 			"expected": omci.GetResponseType})
 		oo.verifyDone <- false
-		return errors.New("unexpected MessageType")
+		return fmt.Errorf("unexpected MessageType %s", oo.deviceID)
 	}
 
 	//TODO!!! further tests on the payload should be done here ...
diff --git a/internal/pkg/onuadaptercore/omci_vlan_config.go b/internal/pkg/onuadaptercore/omci_vlan_config.go
index 34eeef6..cda4905 100644
--- a/internal/pkg/onuadaptercore/omci_vlan_config.go
+++ b/internal/pkg/onuadaptercore/omci_vlan_config.go
@@ -20,7 +20,7 @@
 import (
 	"context"
 	"encoding/binary"
-	"errors"
+	"fmt"
 	"strconv"
 	"sync"
 	"time"
@@ -281,7 +281,7 @@
 		} else {
 			logger.Errorw("UniVlanConfigFsm flow limit exceeded", log.Fields{
 				"device-id": oFsm.pAdaptFsm.deviceID})
-			return errors.New(" UniVlanConfigFsm flow limit exceeded")
+			return fmt.Errorf(" UniVlanConfigFsm flow limit exceeded %s", oFsm.pAdaptFsm.deviceID)
 		}
 	}
 	return nil
@@ -577,17 +577,20 @@
 		{
 			msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeCreateResponse)
 			if msgLayer == nil {
-				logger.Error("Omci Msg layer could not be detected for CreateResponse")
+				logger.Errorw("Omci Msg layer could not be detected for CreateResponse",
+					log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 				return
 			}
 			msgObj, msgOk := msgLayer.(*omci.CreateResponse)
 			if !msgOk {
-				logger.Error("Omci Msg layer could not be assigned for CreateResponse")
+				logger.Errorw("Omci Msg layer could not be assigned for CreateResponse",
+					log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 				return
 			}
 			logger.Debugw("CreateResponse Data", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
 			if msgObj.Result != me.Success {
-				logger.Errorw("Omci CreateResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
+				logger.Errorw("Omci CreateResponse Error - later: drive FSM to abort state ?", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID,
+					"Error": msgObj.Result})
 				// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
 				return
 			}
@@ -612,17 +615,20 @@
 		{
 			msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeSetResponse)
 			if msgLayer == nil {
-				logger.Error("UniVlanConfigFsm - Omci Msg layer could not be detected for SetResponse")
+				logger.Errorw("UniVlanConfigFsm - Omci Msg layer could not be detected for SetResponse",
+					log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 				return
 			}
 			msgObj, msgOk := msgLayer.(*omci.SetResponse)
 			if !msgOk {
-				logger.Error("UniVlanConfigFsm - Omci Msg layer could not be assigned for SetResponse")
+				logger.Errorw("UniVlanConfigFsm - Omci Msg layer could not be assigned for SetResponse",
+					log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 				return
 			}
 			logger.Debugw("UniVlanConfigFsm SetResponse Data", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
 			if msgObj.Result != me.Success {
-				logger.Errorw("UniVlanConfigFsm - Omci SetResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
+				logger.Errorw("UniVlanConfigFsm - Omci SetResponse Error - later: drive FSM to abort state ?",
+					log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "Error": msgObj.Result})
 				// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
 				return
 			}
@@ -639,7 +645,8 @@
 		} //SetResponseType
 	default:
 		{
-			logger.Errorw("UniVlanConfigFsm - Rx OMCI unhandled MsgType", log.Fields{"omciMsgType": msg.OmciMsg.MessageType})
+			logger.Errorw("UniVlanConfigFsm - Rx OMCI unhandled MsgType",
+				log.Fields{"omciMsgType": msg.OmciMsg.MessageType, "deviceId": oFsm.pAdaptFsm.deviceID})
 			return
 		}
 	}
@@ -899,7 +906,7 @@
 	// 		logger.Infow("LockState-bridge-init message reception canceled", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
 	case <-time.After(30 * time.Second): //AS FOR THE OTHER OMCI FSM's
 		logger.Warnw("UniVlanConfigFsm multi entity timeout", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
-		return errors.New("uniVlanConfigFsm multi entity timeout")
+		return fmt.Errorf("uniVlanConfigFsm multi entity timeout %s", oFsm.pAdaptFsm.deviceID)
 	case success := <-oFsm.omciMIdsResponseReceived:
 		if success {
 			logger.Debug("UniVlanConfigFsm multi entity response received")
@@ -907,6 +914,6 @@
 		}
 		// should not happen so far
 		logger.Warnw("UniVlanConfigFsm multi entity response error", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
-		return errors.New("uniVlanConfigFsm multi entity responseError")
+		return fmt.Errorf("uniVlanConfigFsm multi entity responseError %s", oFsm.pAdaptFsm.deviceID)
 	}
 }
diff --git a/internal/pkg/onuadaptercore/onu_device_entry.go b/internal/pkg/onuadaptercore/onu_device_entry.go
index 8c1d097..aa2d5f0 100644
--- a/internal/pkg/onuadaptercore/onu_device_entry.go
+++ b/internal/pkg/onuadaptercore/onu_device_entry.go
@@ -245,7 +245,6 @@
 	devState      OnuDeviceEvent
 	// for mibUpload
 	mibAuditDelay uint16
-	mibDebugLevel string
 
 	// for mibUpload
 	pMibUploadFsm *AdapterFsm //could be handled dynamically and more general as pAdapterFsm - perhaps later
@@ -306,7 +305,6 @@
 	onuDeviceEntry.mibAuditDelay = onuDeviceEntry.supportedFsms["mib-synchronizer"].auditDelay
 	logger.Debugw("MibAudit is set to", log.Fields{"Delay": onuDeviceEntry.mibAuditDelay})
 
-	onuDeviceEntry.mibDebugLevel = "normal" //set to "verbose" if you want to have all output, possibly later also per config option!
 	// Omci related Mib upload sync state machine
 	mibUploadChan := make(chan Message, 2048)
 	onuDeviceEntry.pMibUploadFsm = NewAdapterFsm("MibUpload", deviceID, mibUploadChan)
@@ -410,8 +408,8 @@
 		},
 	)
 	if onuDeviceEntry.pMibDownloadFsm == nil || onuDeviceEntry.pMibDownloadFsm.pFsm == nil {
-		logger.Error("MibDownloadFsm could not be instantiated!!")
-		// some specifc error treatment - or waiting for crash ???
+		logger.Errorw("MibDownloadFsm could not be instantiated", log.Fields{"device-id": deviceID})
+		// TODO some specifc error treatment - or waiting for crash ?
 	}
 
 	onuDeviceEntry.mibTemplateKVStore = onuDeviceEntry.baseDeviceHandler.setBackend(cBasePathMibTemplateKvStore)
@@ -441,31 +439,31 @@
 		oo.coreProxy, oo.adapterProxy)
 	if oo.PDevOmciCC == nil {
 		logger.Errorw("Could not create devOmciCc - abort", log.Fields{"for device-id": oo.deviceID})
-		return errors.New("could not create devOmciCc")
+		return fmt.Errorf("could not create devOmciCc %s", oo.deviceID)
 	}
 
 	oo.started = true
-	logger.Info("OnuDeviceEntry-started")
+	logger.Infow("OnuDeviceEntry-started", log.Fields{"for device-id": oo.deviceID})
 	return nil
 }
 
 //stop terminates the session
 func (oo *OnuDeviceEntry) stop(ctx context.Context) error {
-	logger.Info("stopping-OnuDeviceEntry")
+	logger.Infow("stopping-OnuDeviceEntry", log.Fields{"for device-id": oo.deviceID})
 	oo.started = false
 	//oo.exitChannel <- 1
 	// maybe also the omciCC should be stopped here - for now not as no real processing is expected here - maybe needs consolidation
-	logger.Info("OnuDeviceEntry-stopped")
+	logger.Infow("OnuDeviceEntry-stopped", log.Fields{"for device-id": oo.deviceID})
 	return nil
 }
 
 func (oo *OnuDeviceEntry) reboot(ctx context.Context) error {
-	logger.Info("reboot-OnuDeviceEntry")
+	logger.Infow("reboot-OnuDeviceEntry", log.Fields{"for device-id": oo.deviceID})
 	if err := oo.PDevOmciCC.sendReboot(context.TODO(), ConstDefaultOmciTimeout, true, oo.omciRebootMessageReceivedChannel); err != nil {
 		logger.Errorw("onu didn't reboot", log.Fields{"for device-id": oo.deviceID})
 		return err
 	}
-	logger.Info("OnuDeviceEntry-reboot")
+	logger.Infow("OnuDeviceEntry-reboot", log.Fields{"for device-id": oo.deviceID})
 	return nil
 }
 
@@ -473,30 +471,31 @@
 	select {
 	case <-time.After(3 * time.Second): //3s was detected to be to less in 8*8 bbsim test with debug Info/Debug
 		logger.Warnw("Reboot timeout", log.Fields{"for device-id": oo.deviceID})
-		return errors.New("rebootTimeout")
+		return fmt.Errorf("rebootTimeout")
 	case data := <-responseChannel:
 		switch data.Data.(OmciMessage).OmciMsg.MessageType {
 		case omci.RebootResponseType:
 			{
 				msgLayer := (*data.Data.(OmciMessage).OmciPacket).Layer(omci.LayerTypeRebootResponse)
 				if msgLayer == nil {
-					return errors.New("omci Msg layer could not be detected for RebootResponseType")
+					return fmt.Errorf("omci Msg layer could not be detected for RebootResponseType")
 				}
 				msgObj, msgOk := msgLayer.(*omci.GetResponse)
 				if !msgOk {
-					return errors.New("omci Msg layer could not be assigned for RebootResponseType")
+					return fmt.Errorf("omci Msg layer could not be assigned for RebootResponseType %s", oo.deviceID)
 				}
 				logger.Debugw("CreateResponse Data", log.Fields{"device-id": oo.deviceID, "data-fields": msgObj})
 				if msgObj.Result != me.Success {
-					logger.Errorw("Omci RebootResponseType Error ", log.Fields{"Error": msgObj.Result})
+					logger.Errorw("Omci RebootResponseType Error ", log.Fields{"device-id": oo.deviceID, "Error": msgObj.Result})
 					// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
-					return errors.New("omci RebootResponse Result Error indication")
+					return fmt.Errorf("omci RebootResponse Result Error indication %s for device %s",
+						msgObj.Result, oo.deviceID)
 				}
 				return nil
 			}
 		}
 		logger.Warnw("Reboot response error", log.Fields{"for device-id": oo.deviceID})
-		return errors.New("unexpected OmciResponse type received")
+		return fmt.Errorf("unexpected OmciResponse type received %s", oo.deviceID)
 	}
 }
 
diff --git a/internal/pkg/onuadaptercore/onu_uni_port.go b/internal/pkg/onuadaptercore/onu_uni_port.go
index 0406cc9..8bc029d 100644
--- a/internal/pkg/onuadaptercore/onu_uni_port.go
+++ b/internal/pkg/onuadaptercore/onu_uni_port.go
@@ -19,7 +19,6 @@
 
 import (
 	"context"
-	"errors"
 	"fmt"
 	"strconv"
 	"strings"
@@ -143,7 +142,7 @@
 	} else {
 		logger.Warnw("could not create Voltha UniPort", log.Fields{
 			"device-id": apDeviceHandler.device.Id, "PortNo": oo.portNo})
-		return errors.New("create Voltha UniPort failed")
+		return fmt.Errorf("create Voltha UniPort %d failed on %s", oo.portNo, apDeviceHandler.device.Id)
 	}
 	return nil
 }
diff --git a/internal/pkg/onuadaptercore/onu_uni_tp.go b/internal/pkg/onuadaptercore/onu_uni_tp.go
index f47025b..d9578fe 100644
--- a/internal/pkg/onuadaptercore/onu_uni_tp.go
+++ b/internal/pkg/onuadaptercore/onu_uni_tp.go
@@ -21,6 +21,7 @@
 	"context"
 	"encoding/json"
 	"errors"
+	"fmt"
 	"strconv"
 	"strings"
 	"sync"
@@ -166,7 +167,8 @@
 	if pCurrentUniPort == nil {
 		logger.Errorw("TechProfile configuration aborted: requested uniID not found in PortDB",
 			log.Fields{"device-id": onuTP.deviceID, "uniID": aUniID})
-		onuTP.procResult = errors.New("techProfile config aborted: requested uniID not found")
+		onuTP.procResult = fmt.Errorf("techProfile config aborted: requested uniID not found %d on %s",
+			aUniID, onuTP.deviceID)
 		return
 	}
 
@@ -178,7 +180,7 @@
 	//  (ANI) configuration of this port has to be removed first
 	//  (moreover in this case a possibly existing flow configuration is also not valid anymore and needs clean-up as well)
 	//  existence of configuration can be detected based on tp stored TCONT's
-	//TODO!!!:
+	//TODO:
 	/* if tcontMap  not empty {
 		go onuTP.deleteAniSideConfig(ctx, aUniID, processingStep)
 		if !onuTP.waitForTimeoutOrCompletion(ctx, chTpConfigProcessingStep, processingStep) {
@@ -195,7 +197,8 @@
 		//timeout or error detected
 		logger.Debugw("tech-profile related configuration aborted on read",
 			log.Fields{"device-id": onuTP.deviceID, "UniId": aUniID})
-		onuTP.procResult = errors.New("techProfile config aborted: tech-profile read issue")
+		onuTP.procResult = fmt.Errorf("techProfile config aborted: tech-profile read issue for %d on %s",
+			aUniID, onuTP.deviceID)
 		return
 	}
 
@@ -208,7 +211,8 @@
 				//timeout or error detected
 				logger.Debugw("tech-profile related configuration aborted on set",
 					log.Fields{"device-id": onuTP.deviceID, "UniId": aUniID})
-				onuTP.procResult = errors.New("techProfile config aborted: Omci AniSideConfig failed")
+				onuTP.procResult = fmt.Errorf("techProfile config aborted: Omci AniSideConfig failed %d on %s",
+					aUniID, onuTP.deviceID)
 				//this issue here means that the AniConfigFsm has not finished successfully
 				//which requires to reset it to allow for new usage, e.g. also on a different UNI
 				//(without that it would be reset on device down indication latest)
@@ -219,13 +223,15 @@
 			// strange: UNI entry exists, but no ANI data, maybe such situation should be cleared up (if observed)
 			logger.Debugw("no Tcont/Gem data for this UNI found - abort", log.Fields{
 				"device-id": onuTP.deviceID, "uniID": aUniID})
-			onuTP.procResult = errors.New("techProfile config aborted: no Tcont/Gem data found for this UNI")
+			onuTP.procResult = fmt.Errorf("techProfile config aborted: no Tcont/Gem data found for this UNI %d on %s",
+				aUniID, onuTP.deviceID)
 			return
 		}
 	} else {
 		logger.Debugw("no PonAni data for this UNI found - abort", log.Fields{
 			"device-id": onuTP.deviceID, "uniID": aUniID})
-		onuTP.procResult = errors.New("techProfile config aborted: no AniSide data found for this UNI")
+		onuTP.procResult = fmt.Errorf("techProfile config aborted: no AniSide data found for this UNI %d on %s",
+			aUniID, onuTP.deviceID)
 		return
 	}
 }
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index 7ad98f0..ce33c8e 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -175,7 +175,7 @@
 //Get_ofp_device_info returns OFP information for the given device
 func (oo *OpenONUAC) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) {
 	logger.Errorw("device-handler-not-set", log.Fields{"device-id": device.Id})
-	return nil, errors.New("device-handler-not-set")
+	return nil, fmt.Errorf("device-handler-not-set %s", device.Id)
 }
 
 //Get_ofp_port_info returns OFP port information for the given device
diff --git a/internal/pkg/onuadaptercore/uniportadmin.go b/internal/pkg/onuadaptercore/uniportadmin.go
index 0726be4..dea2a06 100644
--- a/internal/pkg/onuadaptercore/uniportadmin.go
+++ b/internal/pkg/onuadaptercore/uniportadmin.go
@@ -19,7 +19,7 @@
 
 import (
 	"context"
-	"errors"
+	"fmt"
 	"time"
 
 	"github.com/looplab/fsm"
@@ -315,12 +315,14 @@
 	if msg.OmciMsg.MessageType == omci.SetResponseType {
 		msgLayer := (*msg.OmciPacket).Layer(omci.LayerTypeSetResponse)
 		if msgLayer == nil {
-			logger.Error("LockStateFsm - Omci Msg layer could not be detected for SetResponse")
+			logger.Errorw("LockStateFsm - Omci Msg layer could not be detected for SetResponse",
+				log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 			return
 		}
 		msgObj, msgOk := msgLayer.(*omci.SetResponse)
 		if !msgOk {
-			logger.Error("LockStateFsm - Omci Msg layer could not be assigned for SetResponse")
+			logger.Errorw("LockStateFsm - Omci Msg layer could not be assigned for SetResponse",
+				log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
 			return
 		}
 		logger.Debugw("LockStateFsm SetResponse Data", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
@@ -402,7 +404,7 @@
 	// 		logger.Infow("LockState-bridge-init message reception canceled", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
 	case <-time.After(30 * time.Second): //3s was detected to be to less in 8*8 bbsim test with debug Info/Debug
 		logger.Warnw("LockStateFSM uni-set timeout", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
-		return errors.New("lockStateFsm uni-set timeout")
+		return fmt.Errorf("lockStateFsm uni-set timeout for device-id %s", oFsm.pAdaptFsm.deviceID)
 	case success := <-oFsm.omciLockResponseReceived:
 		if success {
 			logger.Debug("LockStateFSM uni-set response received")
@@ -410,6 +412,6 @@
 		}
 		// should not happen so far
 		logger.Warnw("LockStateFSM uni-set response error", log.Fields{"for device-id": oFsm.pAdaptFsm.deviceID})
-		return errors.New("lockStateFsm uni-set responseError")
+		return fmt.Errorf("lockStateFsm uni-set responseError for device-id %s", oFsm.pAdaptFsm.deviceID)
 	}
 }
