Index: trunk/FACT++/src/StateMachineDim.cc
===================================================================
--- trunk/FACT++/src/StateMachineDim.cc	(revision 11062)
+++ trunk/FACT++/src/StateMachineDim.cc	(revision 11063)
@@ -1,6 +1,4 @@
 // **************************************************************************
 /** @class StateMachineDim
-
-@brief Class for a state machine implementation within a DIM network
 
 This class implements a StateMachine within a Dim network. It redirects
@@ -67,5 +65,5 @@
 //
 StateMachineDim::StateMachineDim(ostream &out, const std::string &name)
-    : StateMachine(out, name), DimStart(name, *this), fLog(name, out),
+    : StateMachine(out, name), DimLog(out, name), DimStart(name, DimLog::fLog),
     fDescriptionStates((name+"/STATE_LIST").c_str(), const_cast<char*>(""),
                        "Provides a list with descriptions for each service."
@@ -178,5 +176,5 @@
 int StateMachineDim::Write(const Time &time, const string &txt, int qos)
 {
-    return fLog.Write(time, txt, qos);
+    return DimLog::fLog.Write(time, txt, qos);
 }
 
@@ -193,5 +191,5 @@
 void StateMachineDim::exitHandler(int code)
 {
-    Out() << " -- " << Time().GetAsStr() << ": EXIT(" << code << ") command received." << endl;
+    Out() << " -- " << Time().GetAsStr() << " - EXIT(" << code << ") command received." << endl;
     if (code<0) // negative values reserved for internal use
     {
Index: trunk/FACT++/src/StateMachineDim.h
===================================================================
--- trunk/FACT++/src/StateMachineDim.h	(revision 11062)
+++ trunk/FACT++/src/StateMachineDim.h	(revision 11063)
@@ -2,6 +2,21 @@
 #define FACT_StateMachineDim
 
+// ***************************************************************************
+/**
+ @class DimLog
+
+ @brief Ensures that the MessageDimTX is initialized before errors could be redirected to it
+
+**/
+// ***************************************************************************
 #include "MessageDim.h"       // MessageDimTX
-#include "StateMachine.h"     // StateMachien
+
+class DimLog
+{
+    friend class StateMachineDim;
+
+    MessageDimTX fLog;
+    DimLog(std::ostream &out, const std::string &name) : fLog(name, out) { }
+};
 
 // ***************************************************************************
@@ -28,9 +43,17 @@
 };
 
-class StateMachineDim : public DimCommandHandler, public StateMachine, public DimStart
+// ***************************************************************************
+/**
+ @class StateMachineDim
+
+ @brief Class for a state machine implementation within a DIM network
+
+**/
+// ***************************************************************************
+#include "StateMachine.h"     // StateMachien
+
+class StateMachineDim : public DimCommandHandler, public StateMachine, public DimLog, public DimStart
 {
 private:
-    MessageDimTX fLog;           /// Logging to the Dim network
-
     static const int fVersion;   /// Version number
 
