diff --git a/NPLib/scripts/NPToolLogon.C b/NPLib/scripts/NPToolLogon.C
index e3283729a3b3e7e84f215e770a12e4f1fb56544d..cb759fdeac1a858d073e1ae7df173085c8c514f2 100644
--- a/NPLib/scripts/NPToolLogon.C
+++ b/NPLib/scripts/NPToolLogon.C
@@ -20,14 +20,27 @@
  *                                                                           *
  *                                                                           *
  *****************************************************************************/
+ 
+#include "TSystem.h"
+#include "TList.h"
+#include "TSystemDirectory.h"
+#include "TString.h"
+ 
+#include <iostream>
+using namespace std;
+
+void InitNPTool(bool quietmode = false)
 {
+   TString currentpath = gSystem->Getenv("PWD");
    TString path = gSystem->Getenv("NPLIB");
-
+   
    // Add include path
-   cout << "NPTool: adding include path ..." << endl;
+   if(quietmode)
+    cout << "NPTool: adding include path ..." << endl;
    gSystem->AddIncludePath(Form("%s/include", path.Data()));
 
    // Add shared libraries
+   if(quietmode)
    cout << "NPTool: loading NPLib shared libraries ..." << endl;
    TString libpath = Form("%s/lib", path.Data());
    TSystemDirectory libdir("libdir", libpath);
@@ -37,7 +50,7 @@
    // libVDetector.so library should be loaded before the 
    // lib*Physics.so libraries, it is then loaded manually 
    // first.
-   gSystem->Load(libpath+"/libVdetector.so");
+   gSystem->Load(libpath+"/libVDetector.so");
 
    // Since the libMust2Physics.so library uses TVector2
    // objects, the libPhysics.so ROOT library is loaded.
@@ -51,4 +64,12 @@
          gSystem->Load(lib);
       }
    }
+   
+   TSystemDirectory dir("dir",currentpath);
+   TList* listfile2 = dir.GetListOfFiles();
+   
+   if(quietmode)
+   cout << "NPTool: Ready" << endl;
+   
+   delete listfile2, listfile ;
 }