Index: /trunk/FACT++/src/DataProcessorImp.cc
===================================================================
--- /trunk/FACT++/src/DataProcessorImp.cc	(revision 17342)
+++ /trunk/FACT++/src/DataProcessorImp.cc	(revision 17343)
@@ -1,9 +1,9 @@
 #include "DataProcessorImp.h"
+
+#include <boost/filesystem.hpp>
 
 #include "HeadersFAD.h"
 #include "EventBuilder.h"
 #include "tools.h"
-
-#include "DimWriteStatistics.h" // weird dependency
 
 using namespace std;
@@ -32,5 +32,5 @@
     try
     {
-        DimWriteStatistics::CreateDirectory(name.str());
+        boost::filesystem::create_directories(name);
     }
     catch (const runtime_error &)
Index: /trunk/FACT++/src/DimWriteStatistics.cc
===================================================================
--- /trunk/FACT++/src/DimWriteStatistics.cc	(revision 17342)
+++ /trunk/FACT++/src/DimWriteStatistics.cc	(revision 17343)
@@ -132,49 +132,4 @@
 // --------------------------------------------------------------------------
 //
-//! Check if a given path exists
-//! @param path the path to be checked
-//! @return whether or not the creation has been successfull
-//
-void DimWriteStatistics::CreateDirectory(string path)
-{
-    namespace fs = boost::filesystem;
-
-    //remove last '/', if present
-    if (path[path.size()-1] == '/')
-        path = path.substr(0, path.size()-1);
-
-    //create boost path
-    const fs::path fullPath = fs::system_complete(fs::path(path));
-
-    //if path does not exist, check if upper levels exist already
-    if (fs::exists(fullPath))
-    {
-        //if path already exist, make sure it does not designate a file (filenames cannot be checked if they do not exist)
-        if (fs::is_directory(fullPath))
-            return;
-
-        throw runtime_error("Path to be created is a file  '" + path + "'");
-    }
-
-    // we're hitting "/", which SHOULD have existed...
-    if (path.size() <= 1)
-        throw runtime_error("Path to be created looks suspicious '"+path+"'");
-
-    if (path.find_last_of('/')!=string::npos)
-        CreateDirectory(path.substr(0, path.find_last_of('/')));
-
-    //path does not exist, and upper level have been created already by recusrion.
-    const mode_t rightsMask = S_IRWXU | S_IXGRP | S_IRGRP | S_IXOTH | S_IROTH; //everybody read, owner writes
-
-    if (mkdir(path.c_str(), rightsMask)==0)
-        return;
-
-    ostringstream str;
-    str << "mkdir() failed for '" << path << "': " << strerror(errno) << " [errno=" << errno << "]";
-    throw runtime_error(str.str());
-}
-
-// --------------------------------------------------------------------------
-//
 //! Sets the current folder
 //! @param folder the path to the folder
Index: /trunk/FACT++/src/DimWriteStatistics.h
===================================================================
--- /trunk/FACT++/src/DimWriteStatistics.h	(revision 17342)
+++ /trunk/FACT++/src/DimWriteStatistics.h	(revision 17343)
@@ -82,6 +82,4 @@
 
     static bool DoesPathExist(std::string path, MessageImp &log);
-
-    static void CreateDirectory(std::string path);
 };
 
Index: /trunk/FACT++/src/datalogger.cc
===================================================================
--- /trunk/FACT++/src/datalogger.cc	(revision 17342)
+++ /trunk/FACT++/src/datalogger.cc	(revision 17343)
@@ -368,5 +368,5 @@
     void TrimOldRunNumbers();
     ///Create a given directory
-    bool CreateDirectory(string path);
+    bool CreateDirectory(const string &path);
     /***************************************************
     * INHERITED FROM DimServiceInfoList
@@ -509,9 +509,9 @@
 //! @return whether or not the creation has been successfull
 //
-bool DataLogger::CreateDirectory(string path)
+bool DataLogger::CreateDirectory(const string &path)
 {
     try
     {
-        DimWriteStatistics::CreateDirectory(path);
+        boost::filesystem::create_directories(path);
         return true;
     }
@@ -532,5 +532,4 @@
     return DimWriteStatistics::DoesPathExist(path, *this);
 }
-
 
 void DataLogger::AddServer(const string& server)
