[chronojump] All old Log calls to new LogB calls



commit 8959437dc871abec45f6d667000dedf436c902c6
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Dec 24 00:37:20 2014 +0100

    All old Log calls to new LogB calls

 src/chronojump.cs                                  |  142 +++++------
 src/chronopic.cs                                   |   47 +---
 src/execute/event.cs                               |   22 +-
 src/execute/jump.cs                                |   18 +-
 src/execute/multiChronopic.cs                      |   26 +-
 src/execute/pulse.cs                               |    2 +-
 src/execute/reactionTime.cs                        |    4 +-
 src/execute/run.cs                                 |   18 +-
 src/executeAuto.cs                                 |    3 +-
 src/exportSession.cs                               |    8 +-
 src/genericObjects.cs                              |    8 +-
 src/gui/chronojump.cs                              |  268 +++++++++---------
 src/gui/chronopic.cs                               |   67 +++---
 src/gui/convertWeight.cs                           |    2 +-
 src/gui/encoder.cs                                 |  186 +++++++-------
 src/gui/encoderTreeviews.cs                        |   16 +-
 src/gui/error.cs                                   |    6 +-
 src/gui/event.cs                                   |    2 +-
 src/gui/eventExecute.cs                            |   24 +-
 src/gui/genericWindow.cs                           |    6 +-
 src/gui/jump.cs                                    |    8 +-
 src/gui/jumpType.cs                                |    4 +-
 src/gui/person.cs                                  |   38 ++--
 src/gui/preferences.cs                             |   12 +-
 src/gui/queryServer.cs                             |   12 +-
 src/gui/run.cs                                     |    4 +-
 src/gui/runType.cs                                 |    6 +-
 src/gui/session.cs                                 |   28 +-
 src/gui/splash.cs                                  |    6 +-
 src/gui/stats.cs                                   |   22 +-
 src/log.cs                                         |  120 +--------
 src/logB.cs                                        |    2 +
 src/logConsoleCrayon.cs                            |    2 +
 src/oldCodeNeedToDBConvert/person.cs               |    2 +-
 src/oldCodeNeedToDBConvert/personSession.cs        |    2 +-
 src/oldCodeNeedToDBConvert/sqlite/person.cs        |    6 +-
 src/oldCodeNeedToDBConvert/sqlite/personSession.cs |    4 +-
 src/person.cs                                      |    2 +-
 src/personSession.cs                               |    2 +-
 src/platform.cs                                    |    2 +-
 src/server.cs                                      |   18 +-
 src/session.cs                                     |    2 +-
 src/sqlite/country.cs                              |   10 +-
 src/sqlite/encoder.cs                              |   44 ++--
 src/sqlite/event.cs                                |    8 +-
 src/sqlite/executeAuto.cs                          |    6 +-
 src/sqlite/jump.cs                                 |   18 +-
 src/sqlite/jumpRj.cs                               |   12 +-
 src/sqlite/jumpType.cs                             |   30 +-
 src/sqlite/main.cs                                 |  290 ++++++++++----------
 src/sqlite/multiChronopic.cs                       |   12 +-
 src/sqlite/oldConvert.cs                           |   16 +-
 src/sqlite/person.cs                               |   38 ++--
 src/sqlite/personSession.cs                        |   30 +-
 src/sqlite/personSessionNotUpload.cs               |    6 +-
 src/sqlite/preferences.cs                          |    6 +-
 src/sqlite/pulse.cs                                |    8 +-
 src/sqlite/pulseType.cs                            |   10 +-
 src/sqlite/reactionTime.cs                         |    8 +-
 src/sqlite/run.cs                                  |    8 +-
 src/sqlite/runInterval.cs                          |    8 +-
 src/sqlite/runType.cs                              |   22 +-
 src/sqlite/server.cs                               |   12 +-
 src/sqlite/session.cs                              |   40 ++--
 src/sqlite/speciallity.cs                          |    4 +-
 src/sqlite/sport.cs                                |    4 +-
 src/sqlite/stat.cs                                 |   36 ++--
 src/statType.cs                                    |   18 +-
 src/stats/main.cs                                  |   32 +-
 src/stats/rjEvolution.cs                           |    8 +-
 src/treeViewEvent.cs                               |    2 +-
 src/util.cs                                        |   18 +-
 src/utilCSV.cs                                     |    8 +-
 src/utilEncoder.cs                                 |   45 ++--
 src/utilGtk.cs                                     |    2 +-
 src/utilVideo.cs                                   |    4 +-
 76 files changed, 923 insertions(+), 1079 deletions(-)
---
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 7e35aa4..2042c8e 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -64,27 +64,13 @@ public class ChronoJump
                Log.WriteLine(string.Format("Time log passed: {0}", timeLogPassedOk.ToString()));
                Log.WriteLine(string.Format("Client database option 1 in ... " + Util.GetDatabaseDir()));
                Log.WriteLine(string.Format("Client database option 2 in ... " + Util.GetDatabaseTempDir()));
-               string errorFile = Log.GetFile();
-       
-               //comment this 4 lines to deactivated log, and use console.
-               //works better on a sudden crash
                */
                
-               
                //1.4.10
                Log.Start();
-               
-               LogB.Information("Opening something");
+               LogB.Debugging = true; //now LogB.Debug will be shown. Also there will be thread info on 
Warning, Error, Information
+       
 
-               LogB.Debug("debug false"); //this is not shown
-               LogB.Debugging = true; //now next Debug will be shown and Warning, Error, Information will 
have thread info
-               LogB.Debug("debug true");
-               
-               LogB.Warning("Opening something");
-               LogB.Error("Opening something");
-               LogB.Information("Opening something");
-               
-               
                var envPath = Environment.GetEnvironmentVariable ("PATH");
                var rBinPath = "";
                baseDirectory = Util.GetPrefixDir();
@@ -100,29 +86,29 @@ public class ChronoJump
 
                        if (Directory.Exists(rPath) == false) {
                                throw new DirectoryNotFoundException(string.Format("Could not found the 
specified path to the directory containing R.dll: {0}", rPath));
-                               Log.WriteLine("Could not found the specified path to the directory containing 
R.dll: " + rPath);
+                               LogB.Error("Could not found the specified path to the directory containing 
R.dll: ", rPath);
                        }
 
                        var newPath = string.Format("{0}{1}{2}", rPath, System.IO.Path.PathSeparator, 
envPath);
-                       Log.WriteLine("newPath:" + newPath);
+                       LogB.Information("newPath:", newPath);
                
                        System.Environment.SetEnvironmentVariable("PATH", newPath);
-                       Log.WriteLine("path:" + System.Environment.GetEnvironmentVariable("PATH"));
+                       LogB.Information("path:", System.Environment.GetEnvironmentVariable("PATH"));
                        
                        //use this because we don't want to look at the registry
                        //we don't want to force user to install R
                        Environment.SetEnvironmentVariable ("R_HOME", baseDirectory);
-                       Log.WriteLine("R_HOME:" + baseDirectory);
+                       LogB.Information("R_HOME:", baseDirectory);
                } else {
                        switch (NativeUtility.GetPlatform()) {
                                case PlatformID.MacOSX:
-                                       Log.WriteLine(Environment.GetEnvironmentVariable("R_HOME"));
+                                       LogB.Information(Environment.GetEnvironmentVariable("R_HOME"));
                                        rBinPath = "/Library/Frameworks/R.Framework/Libraries";
                                                Environment.SetEnvironmentVariable ("R_HOME", 
"/Library/Frameworks/R.Framework/Resources");
                                                Environment.SetEnvironmentVariable("PATH", rBinPath + 
Path.PathSeparator + envPath);
-                                       Log.WriteLine("environments");
-                                       Log.WriteLine(Environment.GetEnvironmentVariable("R_HOME"));
-                                       Log.WriteLine(Environment.GetEnvironmentVariable("PATH"));
+                                       LogB.Information("environments");
+                                       LogB.Information(Environment.GetEnvironmentVariable("R_HOME"));
+                                       LogB.Information(Environment.GetEnvironmentVariable("PATH"));
                                        break;
                                case PlatformID.Unix:
                                        rBinPath = @"/usr/lib/R/lib";
@@ -132,16 +118,15 @@ public class ChronoJump
                        }
                }
                
-               Log.WriteLine("Platform:" + Environment.OSVersion.Platform);
-               Log.WriteLine("Platform Mac:" + PlatformID.MacOSX);
-               Log.WriteLine("initializing rdotnet");
+               LogB.Information("Platform:" + Environment.OSVersion.Platform);
+               //LogB.Information("initializing rdotnet");
                //REngine rengineProva = REngine.CreateInstance("RDotNet");
 
                //Environment.Exit(1);
                
-               Log.WriteLine("baseDir0:" + System.AppDomain.CurrentDomain.BaseDirectory);
-               Log.WriteLine("baseDir1:" + baseDirectory);
-               Log.WriteLine("envPath+rBinPath:" + envPath + Path.PathSeparator + rBinPath);
+               LogB.Information("baseDir0:", System.AppDomain.CurrentDomain.BaseDirectory);
+               LogB.Information("baseDir1:", baseDirectory);
+               LogB.Information("envPath+rBinPath:", envPath + Path.PathSeparator + rBinPath);
                
        
                //UtilCSV.ReadValues("/tmp/chronojump-encoder-graph-input-multi.csv");  
@@ -213,7 +198,7 @@ public class ChronoJump
                if(crashedBefore) {
                        if(chronojumpIsExecutingNTimes()) {
                                quitNow = true;
-                               Log.WriteLine("\n\nChronojump is already running.\n");
+                               LogB.Error("Chronojump is already running.");
                                Application.Quit();
                                return;
                        }
@@ -224,25 +209,21 @@ public class ChronoJump
                //print version of chronojump
                progVersion = readVersion();
 
-               Log.WriteLine(string.Format("Chronojump version: {0}", progVersion));
+               LogB.Information("Chronojump version: {0}", progVersion);
 
                //to store user videos and photos
                Util.CreateMultimediaDirsIfNeeded();
                //to store encoder data and graphs
                UtilEncoder.CreateEncoderDirIfNeeded();
 
-//TODO: create encoder session dirs when load or create a session, or when use encoder with button 
capture_from_encoder
 //TODO: when a session is deleted, encoder data has to be deleted, also multimedia videos, I suppose. Show 
message to user warning about it
-//TODO: encoder sensitive when person is loaded
 //TODO: encoder weight auto written depending on person loaded, and changes if it changes person or weight
 
-
-
                
                //move database to new location if chronojump version is before 0.7
                moveDatabaseToNewLocationIfNeeded();
 
-               Log.WriteLine("move? ended");
+               LogB.Information("move? ended");
 
                splashMessageChange(1);  //checking database
 
@@ -255,7 +236,7 @@ public class ChronoJump
                Sqlite.CreateDir();
                bool defaultDBLocation = Sqlite.Connect();
 
-               Log.WriteLine("sqlite connected");
+               LogB.SQL("sqlite connected");
 
                /*      
                splashMessage = "post-connect" + defaultDBLocation.ToString();
@@ -265,7 +246,7 @@ public class ChronoJump
                
                //Chech if the DB file exists
                if (!Sqlite.CheckTables(defaultDBLocation)) {
-                       Log.WriteLine ( Catalog.GetString ("no tables, creating ...") );
+                       LogB.SQL ( Catalog.GetString ("no tables, creating ...") );
 
                        creatingDB = true;
                        splashMessageChange(2);  //creating database
@@ -298,28 +279,28 @@ public class ChronoJump
                        Sqlite.CreateTables(false); //not server
                        creatingDB = false;
                } else {
-Log.WriteLine("doing backup");
+                       LogB.SQL("doing backup");
                        //backup the database
                        Util.BackupDirCreateIfNeeded();
 
                        splashMessageChange(3);  //making db backup
 
                        Util.BackupDatabase();
-                       Log.WriteLine ("made a database backup"); //not compressed yet, it seems 
System.IO.Compression.DeflateStream and
+                       LogB.SQL ("made a database backup"); //not compressed yet, it seems 
System.IO.Compression.DeflateStream and
                        //System.IO.Compression.GZipStream are not in mono
 
 
                        if(! Sqlite.IsSqlite3()) {
                                bool ok = Sqlite.ConvertFromSqlite2To3();
                                if (!ok) {
-                                       Log.WriteLine("******\n problem with sqlite \n******");
+                                       LogB.Error("problem with sqlite");
                                        //check (spanish)
                                        
//http://mail.gnome.org/archives/chronojump-devel-list/2008-March/msg00011.html
                                        string errorMessage = Catalog.GetString("Failed database conversion, 
ensure you have libsqlite3-0 installed. \nIf problems persist ask in chronojump-list");
                                        errorMessage += "\n\n" + string.Format(Catalog.GetString("If you have 
no data on your database (you just installed Chronojump), you can fix this problem deleting this file: {0}"), 
                                                        Util.GetDatabaseDir() + Path.DirectorySeparatorChar + 
"chronojump.db") + 
                                                "\n" + Catalog.GetString("And starting Chronojump again.");
-                                       Log.WriteLine(errorMessage);
+                                       LogB.Error(errorMessage);
                                        messageToShowOnBoot += errorMessage;
                                        chronojumpHasToExit = true;
                                }
@@ -343,12 +324,12 @@ Log.WriteLine("doing backup");
                                                Catalog.GetString("Please update Chronojump") + ":\n"; 
                                errorMessage += "http://chronojump.org";; 
                                //errorMessage += "\n\n" + Catalog.GetString("Press any key");
-                               Log.WriteLine(errorMessage);
+                               LogB.Error(errorMessage);
                                messageToShowOnBoot += errorMessage;
                                chronojumpHasToExit = true;
                        }
 
-                       Log.WriteLine ( Catalog.GetString ("tables already created") ); 
+                       LogB.Information ( Catalog.GetString ("tables already created") ); 
                
 
                        //check for bad Rjs (activate if program crashes and you use it in the same db before 
v.0.41)
@@ -437,7 +418,7 @@ Log.WriteLine("doing backup");
                SqlitePreferences.Update("simulated", "True", false); //false (dbcon not opened)
                
                allSQLCallsDoneOnSqliteThingsThread = true;
-               Log.WriteLine("all SQL calls done on sqliteThings thread");
+               LogB.SQL("all SQL calls done on sqliteThings thread");
                
                UtilAll.IsWindows();    //only as additional info here
                
@@ -448,39 +429,40 @@ Log.WriteLine("doing backup");
        }
 
        private void findVersion() {
-Console.WriteLine("--1--");
+               LogB.Debug("--1--");
                pingStart = true;
                pulseGTKPingShouldEnd = false;
                splashShowButton = true;
                
-Console.WriteLine("--2--");
+               LogB.Debug("--2--");
                //maybe other thread doesn't create at time the splash win
                //then just wait
-               while(! createdSplashWin)
-                       ;
-Console.WriteLine("--2.1--");
-
+               while(! createdSplashWin)
+                       ;
+               
+               LogB.Debug("--2.1--");
+                       
                try {
                        if(splashWin.FakeButtonCreated)
-                               Console.WriteLine("\nCreated splashWin.FakeButton\n");
+                               LogB.Information("Created splashWin.FakeButton");
                        else
-                               Console.WriteLine("\nNOT Created splashWin.FakeButton, si es bloqueja, posar 
aquí un while (mentre no estigui creat)\n");
+                               LogB.Warning("NOT Created splashWin.FakeButton, si es bloqueja, posar aquí un 
while (mentre no estigui creat)");
 
                        splashWin.FakeButtonCancel.Clicked += new EventHandler(on_find_version_cancelled);
 
-                       Console.WriteLine("--3--");
+                       LogB.Debug("--3--");
                } catch {
-                       Console.WriteLine("Problem with splash win");
+                       LogB.Warning("Problem with splash win");
                }
 
                versionAvailable = Server.Ping(true, progName, readVersion()); //doInsertion
                
-Console.WriteLine("--4--");
+               LogB.Debug("--4--");
                splashShowButton = false;
-               Console.Write(" version:  " + versionAvailable);
-Console.WriteLine("\n--5--");
+               LogB.Information(" version:  ", versionAvailable);
+               LogB.Debug("\n--5--");
                pingEnd = true;
-Console.WriteLine("--6--");
+               LogB.Debug("--6--");
        }
                
        private void on_find_version_cancelled(object o, EventArgs args) {
@@ -529,35 +511,35 @@ Console.WriteLine("--6--");
 
                //wait until all sql calls are done in other thread
                //then there will be no more a try to open an already opened dbcon
-               Log.WriteLine("Checking if all SQL calls done on sqliteThings thread");
+               LogB.SQL("Checking if all SQL calls done on sqliteThings thread");
                while(! allSQLCallsDoneOnSqliteThingsThread) {
                }
-               Log.WriteLine("all SQL done! starting Chronojump");
+               LogB.SQL("all SQL done! starting Chronojump");
 
                new ChronoJumpWindow(progVersion, progName, runningFileName);
        }
 
        private static void createBlankDB() {
-               Log.WriteLine("Creating blank database");
+               LogB.SQL("Creating blank database");
                Sqlite.ConnectBlank();
                Sqlite.CreateFile();
                Sqlite.CreateTables(false); //not server
-               Console.WriteLine("Done! Exiting");
+               LogB.SQL("Created blank database! Exiting");
        }
        
        private static void createBlankDBServer() {
-               Log.WriteLine("Creating blank database for server");
+               LogB.SQL("Creating blank database for server");
                if(Sqlite.CheckFileServer())
-                       Console.WriteLine("File already exists. Cannot create.");
+                       LogB.Error("File already exists. Cannot create.");
                else {
                        Sqlite.ConnectServer();
                        Sqlite.CreateFile();
                        Sqlite.CreateTables(true); //server
-                       Console.WriteLine("Done! Exiting");
+                       LogB.SQL("Created blank database! Exiting");
                        string myVersion = readVersion();
-                       Console.WriteLine("CAUTION: client info about versionAvailable (on server): " + 
myVersion);
+                       LogB.Warning("CAUTION: client info about versionAvailable (on server): ", myVersion);
                        SqlitePreferences.Update ("availableVersion", myVersion, false); 
-                       Console.WriteLine("Maybe you don't want to show this version on pings, change it to 
last stable published version");
+                       LogB.Information("Maybe you don't want to show this version on pings, change it to 
last stable published version");
                }
        }
 
@@ -581,7 +563,7 @@ Console.WriteLine("--6--");
                if( ( needEndSplashWin && pingEnd ) 
                                || ! thread.IsAlive) {
                        fakeSplashButton.Click();
-                       Log.Write("splash window ending here");
+                       LogB.Information("splash window ending here");
                        return false;
                }
                //need to do this, if not it crashes because chronopicWin gets died by thread ending
@@ -616,10 +598,10 @@ Console.WriteLine("--6--");
        }
        
        private void on_splash_ended(object o, EventArgs args) {
-               Log.WriteLine("\nsplash screen going to END");
+               LogB.Information("splash screen going to END");
                fakeSplashButton.Clicked -= new EventHandler(on_splash_ended);
                splashWin.Destroy();
-               Log.WriteLine("splash screen ENDED!");
+               LogB.Information("splash screen ENDED!");
                readMessageToStart();
        }
 
@@ -627,7 +609,7 @@ Console.WriteLine("--6--");
        {
                if(pulseGTKPingShouldEnd) {
                        splashWin.CancelButtonShow(false);
-                       Log.WriteLine("\nping going to END");
+                       LogB.Information("ping going to END");
                        return false;
                }
 
@@ -637,7 +619,7 @@ Console.WriteLine("--6--");
                        splashWin.CancelButtonShow(false);
 
                Thread.Sleep (50);
-               Log.Write(" (PulseGTKPing:" + thread.ThreadState.ToString() + ") ");
+               LogB.Debug(" (PulseGTKPing:" + thread.ThreadState.ToString() + ") ");
                if(thread.ThreadState == System.Threading.ThreadState.Stopped)
                        pulseGTKPingShouldEnd = true;
                return true;
@@ -687,7 +669,7 @@ Console.WriteLine("--6--");
                 * This are the only outputs to Console. Other's use Log that prints to console and to log 
file
                 * this doesn't go to log because it talks about log
                 */
-               Log.WriteLine(messageChrashedBefore);
+               LogB.Warning(messageChrashedBefore);
                
                return;
        }
@@ -835,7 +817,7 @@ Console.WriteLine("--6--");
                                                catch {
                                                        fileMoveProblems ++;
                                                        try {
-                                                               Log.WriteLine(string.Format("{0}-{1}", 
oldFile, newFile));
+                                                               LogB.Warning(string.Format("{0}-{1}", 
oldFile, newFile));
                                                                File.Copy(oldFile, newFile);
                                                        }
                                                        catch {
@@ -850,7 +832,7 @@ Console.WriteLine("--6--");
                                        feedback += string.Format(Catalog.GetString("Please, do it 
manually.")) + "\n"; 
                                        feedback += string.Format(Catalog.GetString("Chronojump will exit 
now.")) + "\n";
                                        messageToShowOnBoot += feedback;        
-                                       Log.WriteLine(feedback);
+                                       LogB.Error(feedback);
                                        chronojumpHasToExit = true;
                                }
                                if(fileCopyProblems > 0) {
@@ -858,20 +840,20 @@ Console.WriteLine("--6--");
                                        feedback += string.Format(Catalog.GetString("Please, do it 
manually.")) + "\n"; 
                                        feedback += string.Format(Catalog.GetString("Chronojump will exit 
now.")) + "\n";
                                        messageToShowOnBoot += feedback;        
-                                       Log.WriteLine(feedback);
+                                       LogB.Error(feedback);
                                        chronojumpHasToExit = true;
                                }
                                if(fileMoveProblems > 0) {
                                        feedback += string.Format(Catalog.GetString("Cannot move {0} files 
from {1} to {2}"), fileMoveProblems, previous, Path.GetFullPath(newDB)) + "\n";
                                        feedback += string.Format(Catalog.GetString("Please, do it 
manually")) + "\n";
                                        messageToShowOnBoot += feedback;        
-                                       Log.WriteLine(feedback);
+                                       LogB.Error(feedback);
                                }
                        }
                                        
                        string dbMove = string.Format(Catalog.GetString("Database is now here: {0}"), 
Path.GetFullPath(newDB));
                        messageToShowOnBoot += dbMove;  
-                       Log.WriteLine(dbMove);
+                       LogB.Warning(dbMove);
                }
        }
 
diff --git a/src/chronopic.cs b/src/chronopic.cs
index 801e37a..67f1d42 100644
--- a/src/chronopic.cs
+++ b/src/chronopic.cs
@@ -58,17 +58,14 @@ public class Chronopic {
        //-- Constructor
        public Chronopic(SerialPort sp)
        {
-Console.Write("0");
                //-- Comprobar si puerto serie ya estaba abierto
                if (sp != null)
                        if (sp.IsOpen)
                                sp.Close();
 
-Console.Write("1");
                //-- Abrir puerto serie
                sp.Open();
 
-Console.Write("2");
                //-- Configurar timeout por defecto
                //de momento no en windows (hasta que no encontremos por qué falla)
                //OperatingSystem os = Environment.OSVersion;
@@ -77,11 +74,9 @@ Console.Write("2");
                //if( ! os.Platform.ToString().ToUpper().StartsWith("WIN"))
                        sp.ReadTimeout = DefaultTimeout;
 
-Console.Write("3");
                //-- Guardar el puerto serie
                this.sp = sp;
 
-Console.Write("4");
 //             //-- Vaciar buffer
 //             //done in a separate method
 //             this.flush();
@@ -152,26 +147,25 @@ Console.Write("4");
        
        public void Read_variables_automatic()
        {
-               Console.WriteLine("---------------------------");
-               Console.WriteLine("ReadVarAutoStart");
+               LogB.Information("ReadVarAutoStart");
 
                if (sp == null)
                        sp.Open(); 
                
-               Console.WriteLine("ReadVarAutoOpened");
+               LogB.Information("ReadVarAutoOpened");
 
                try {
                        sp.Write("J");
-                       Console.WriteLine("Port scanning (should return 'J'): " + (char) sp.ReadByte());
+                       LogB.Information("Port scanning (should return 'J'): " + (char) sp.ReadByte());
                } catch {
                        this.error=ErrorType.Timeout;
-                       Console.WriteLine("Timeout. This is not Chronopic-Automatic-Firmware");
+                       LogB.Information("Timeout. This is not Chronopic-Automatic-Firmware");
                        return;
                }
 
                
                sp.Write("V");
-               Console.WriteLine("Version: " + 
+               LogB.Information("Version: " + 
                                (char) sp.ReadByte() +
                                (char) sp.ReadByte() +
                                (char) sp.ReadByte() 
@@ -181,24 +175,21 @@ Console.Write("4");
 
                sp.Write("a");
                debounce = ( sp.ReadByte() - '0' ) * 10;
-               Console.WriteLine("\nCurrent debounce time: " + debounce.ToString());
+               LogB.Information("Current debounce time:", debounce.ToString());
 
-               Console.WriteLine("Changing to 10 ms ... ");
+               LogB.Information("Changing to 10 ms ... ");
                sp.Write("b\x01");
 
                sp.Write("a");
                debounce = ( sp.ReadByte() - '0' ) * 10;
-               Console.WriteLine("Current debounce time: " + debounce.ToString());
+               LogB.Information("Current debounce time:", debounce.ToString());
 
-               Console.WriteLine("Changing to 50 ms ... ");
+               LogB.Information("Changing to 50 ms ... ");
                sp.Write("b\x05");
 
                sp.Write("a");
                debounce = ( sp.ReadByte() - '0' ) * 10;
-               Console.WriteLine("Current debounce time: " + debounce.ToString());
-
-               Console.WriteLine("---------------------------");
-
+               LogB.Information("Current debounce time: ", debounce.ToString());
        }
 
 
@@ -215,11 +206,9 @@ Console.Write("4");
                int count;
                bool status;
                        
-Console.Write(" o1 ");
                if (sp != null)
                        if (sp.IsOpen) 
                                sp.Close();
-Console.Write(" o2 ");
                
                try {
                        sp.Open();
@@ -229,12 +218,9 @@ Console.Write(" o2 ");
                        this.error=ErrorType.Timeout;
                        return status;
                }
-Console.Write(" o3 ");
 
-//Console.Write("h");
                //-- Enviar la trama por el puerto serie
                sp.Write(trama,0,1);
-//Console.Write("i");
 
                //-- Esperar a que llegue la respuesta
                //-- Se espera hasta que en el buffer se tengan el numero de bytes
@@ -242,12 +228,10 @@ Console.Write(" o3 ");
                //-- timeout se aborta
                count=0;
                do {
-//Console.Write("j");
                        n = sp.Read(respuesta,count,2-count);
                        count+=n;
                } while (count<2 && n!=-1);
 
-//Console.Write("k");
                //-- Comprobar la respuesta recibida
                switch(count) {
                        case 2 : //-- Datos listos
@@ -287,7 +271,6 @@ Console.Write(" o3 ");
                                break;
                }
 
-//Console.Write("l");
                return status;
        }
 
@@ -371,14 +354,14 @@ Console.Write(" o3 ");
                        try{
                                sp.Read(buffer,0,256);
                                success = true;
-                               Log.Write(" spReaded ");
+                               LogB.Debug(" spReaded ");
                        } catch {
-                               Log.Write(" catchedTimeOut ");
+                               LogB.Warning(" catchedTimeOut ");
                        }
 
                } while(! success && ! AbortFlush);
                if(AbortFlush) {
-                       Log.WriteLine("Abort flush");
+                       LogB.Information("Abort flush");
                }
        }
 
@@ -451,7 +434,7 @@ public abstract class ChronopicAuto
                        str = Communicate();
                } catch {
                        //this.error=ErrorType.Timeout;
-                       Console.WriteLine("Error or Timeout. This is not Chronopic-Automatic-Firmware");
+                       LogB.Warning("Error or Timeout. This is not Chronopic-Automatic-Firmware");
                        str = "Error / not Multitest firmware";
                }
                
@@ -470,7 +453,7 @@ public abstract class ChronopicAuto
                        str = Communicate();
                } catch {
                        //this.error=ErrorType.Timeout;
-                       Console.WriteLine("Error or Timeout. This is not Chronopic-Automatic-Firmware");
+                       LogB.Warning("Error or Timeout. This is not Chronopic-Automatic-Firmware");
                        str = "Error / not Multitest firmware";
                }
                
diff --git a/src/execute/event.cs b/src/execute/event.cs
index cb555fd..9f43846 100644
--- a/src/execute/event.cs
+++ b/src/execute/event.cs
@@ -165,7 +165,7 @@ public class EventExecute
        //public virtual void Simulate(Random randSent)
        public virtual void SimulateInitValues(Random randSent)
        {
-               Log.WriteLine("From event.cs");
+               LogB.Information("From event.cs");
 
                //look at the override on jump.cs for a sample
                
@@ -192,7 +192,7 @@ public class EventExecute
                        try {
                                ok = cp.Read_platform(out myPlatformState);
                        } catch {
-                               Log.WriteLine("Manage called after finishing constructor, do later");
+                               LogB.Warning("Manage called after finishing constructor, do later");
                        }
                        Thread.Sleep(timeWait); //wait 50ms
                        count += timeWait;
@@ -235,13 +235,13 @@ public class EventExecute
 
                if ( ! thread.IsAlive || cancel) {
                        fakeButtonThreadDyed.Click();
-                       Log.Write("dying");
+                       LogB.Information("dying");
 
                        return false;
                }
        
                Thread.Sleep (50);
-               //Log.Write(thread.ThreadState.ToString());
+               //LogB.Debug(thread.ThreadState.ToString());
                return true;
        }
 
@@ -312,9 +312,9 @@ public class EventExecute
                if(needUpdateGraph) {
                        //solve problems when runAnalysis ended and tries to paint window
                        if(needUpdateGraphType == eventType.MULTICHRONOPIC && type == 
Constants.RunAnalysisName && finish) 
-                               Console.WriteLine("is MC, RA, finished!");      
+                               LogB.Information("is MC, RA, finished!");       
                        else if(needUpdateGraphType == eventType.MULTICHRONOPIC && type == 
Constants.RunAnalysisName && ! finish) {
-                               Console.WriteLine("is MC, RA, NOT finished!");  
+                               LogB.Information("is MC, RA, NOT finished!");   
                                updateGraph();
                        } else
                                updateGraph();
@@ -436,13 +436,13 @@ public class EventExecute
        }
 
        protected void simulateChangePlatform() {
-               Log.Write("Changing!");
-               Log.WriteLine(string.Format("PRE timeLast: {0}, timerCount: {1}, timeAccumulated: {2}", 
simulatedTimeLast, timerCount, simulatedTimeAccumulatedBefore));
+               LogB.Information("Changing!");
+               LogB.Information(string.Format("PRE timeLast: {0}, timerCount: {1}, timeAccumulated: {2}", 
simulatedTimeLast, timerCount, simulatedTimeAccumulatedBefore));
 
                simulatedTimeLast = timerCount - simulatedTimeAccumulatedBefore;
                //simulatedTimeAccumulatedBefore = timerCount;
                simulatedTimeAccumulatedBefore = Math.Round(timerCount,2);
-               Log.WriteLine(string.Format("POST: timeLast: {0}, timerCount: {1}, timeAccumulated: {2}", 
simulatedTimeLast, timerCount, simulatedTimeAccumulatedBefore));
+               LogB.Information(string.Format("POST: timeLast: {0}, timerCount: {1}, timeAccumulated: {2}", 
simulatedTimeLast, timerCount, simulatedTimeAccumulatedBefore));
 
                //change the boolean who points to 'which are the MINs and the MAXs
                simulatedCurrentTimeIntervalsAreContact = ! simulatedCurrentTimeIntervalsAreContact;
@@ -452,7 +452,7 @@ public class EventExecute
                else
                        platformState = Chronopic.Plataforma.ON;
 
-               Log.WriteLine("Changed!");
+               LogB.Information("Changed!");
        }
                        
        private void updateGraph() {
@@ -513,7 +513,7 @@ public class EventExecute
                return false;
        }
        public virtual void MultiChronopicWrite(bool tempTable) {
-               Console.WriteLine("at event.cs");
+               LogB.Information("at event.cs");
        }
                        
        public Gtk.Button FakeButtonUpdateGraph {
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index b3201ab..044a5e7 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -92,7 +92,7 @@ public class JumpExecute : EventExecute
        
        public override void SimulateInitValues(Random randSent)
        {
-               Log.WriteLine("From execute/jump.cs");
+               LogB.Information("From execute/jump.cs");
 
                rand = randSent; //we send the random, because if we create here, the values will be the same 
for each nbew instance
                simulated = true;
@@ -328,7 +328,7 @@ public class JumpExecute : EventExecute
                                                if(simulated)
                                                        timestamp = simulatedTimeLast * 1000; //conversion to 
milliseconds
                                                
-                                               Log.Write(string.Format("t1:{0}", timestamp));
+                                               LogB.Information(string.Format("t1:{0}", timestamp));
 
                                                tv = timestamp / 1000.0;
                                                write();
@@ -357,7 +357,7 @@ public class JumpExecute : EventExecute
                                                if(simulated)
                                                        timestamp = simulatedTimeLast * 1000; //conversion to 
milliseconds
                                                
-                                               Log.Write(string.Format("t2:{0}", timestamp));
+                                               LogB.Information(string.Format("t2:{0}", timestamp));
                                                
                                                //record the TC
                                                tc = timestamp / 1000.0;
@@ -698,7 +698,7 @@ public class JumpRjExecute : JumpExecute
                                if(simulated)
                                        timestamp = simulatedTimeLast * 1000; //conversion to milliseconds
 
-                               Log.Write(Util.GetTotalTime(tcString, tvString).ToString());
+                               LogB.Information(Util.GetTotalTime(tcString, tvString).ToString());
 
 
                                        
@@ -718,7 +718,7 @@ public class JumpRjExecute : JumpExecute
                                                needShowFeedbackMessage = true; 
                                        } else {
                                                //reactive jump has not finished... record the next jump
-                                               Log.WriteLine(string.Format("tcCount: {0}, tvCount: {1}", 
tcCount, tvCount));
+                                               LogB.Information(string.Format("tcCount: {0}, tvCount: {1}", 
tcCount, tvCount));
                                                if ( tcCount == tvCount )
                                                {
                                                        lastTc = timestamp/1000.0;
@@ -862,7 +862,7 @@ public class JumpRjExecute : JumpExecute
                        } else {
                                //we are on air
                                if(allowFinishAfterTime) {
-                                       Log.Write("ALLOW!!");
+                                       LogB.Information("ALLOW!!");
                                        //allow to finish later, return false, and waitEvent (looking at 
shouldFinishAtNextFall)
                                        //will finishJump when he falls 
                                        shouldFinishAtNextFall = true;
@@ -913,7 +913,7 @@ public class JumpRjExecute : JumpExecute
        private void updateTimerCountWithChronopicData(string tcString, string tvString) {
                //update timerCount, with the chronopic data
                //but in the first jump probably one is zero and then GetTotalTime returns a 0
-               Log.WriteLine(string.Format("///I timerCount: {0} tcString+tvString: {1} ///", timerCount, 
Util.GetTotalTime(tcString) + Util.GetTotalTime(tvString)));
+               LogB.Information(string.Format("///I timerCount: {0} tcString+tvString: {1} ///", timerCount, 
Util.GetTotalTime(tcString) + Util.GetTotalTime(tvString)));
                if(tvString.Length == 0) 
                        timerCount =  Util.GetTotalTime(tcString);
                else if (tcString.Length == 0) 
@@ -925,7 +925,7 @@ public class JumpRjExecute : JumpExecute
                                
        protected void writeRj(bool tempTable)
        {
-               Log.WriteLine("----------WRITING----------");
+               LogB.Information("----------WRITING----------");
                int jumps;
                string limitString = "";
                string description = "";
@@ -946,7 +946,7 @@ public class JumpRjExecute : JumpExecute
                                while(eventPassed) {
                                        tcString = Util.DeleteLastSubEvent(tcString);
                                        tvString = Util.DeleteLastSubEvent(tvString);
-                                       Log.WriteLine("Deleted one event out of time");
+                                       LogB.Information("Deleted one event out of time");
                                        eventPassed = Util.EventPassedFromMaxTime(tcString, tvString, 
limitAsDouble, allowFinishAfterTime);
                                        deletedEvent = true;
                                }
diff --git a/src/execute/multiChronopic.cs b/src/execute/multiChronopic.cs
index cb6149c..c988bdb 100644
--- a/src/execute/multiChronopic.cs
+++ b/src/execute/multiChronopic.cs
@@ -436,7 +436,7 @@ public class MultiChronopicExecute : EventExecute
                                                                isFirstOut = false;
                                                        else {
                                                                double lastOut = timestamp/1000.0;
-                                                               Log.WriteLine(cpNum.ToString() + " landed: " 
+ lastOut.ToString());
+                                                               LogB.Information(cpNum.ToString() + " landed: 
" + lastOut.ToString());
                                                                outStr = outStr + outEqual + 
lastOut.ToString();
                                                                outEqual = "="; 
                                                        }
@@ -460,7 +460,7 @@ public class MultiChronopicExecute : EventExecute
                                                                isFirstIn = false;
                                                        else {
                                                                double lastIn = timestamp/1000.0;
-                                                               Log.WriteLine(cpNum.ToString() + " jumped: " 
+ lastIn.ToString());
+                                                               LogB.Information(cpNum.ToString() + " jumped: 
" + lastIn.ToString());
                                                                inStr = inStr + inEqual + lastIn.ToString();
                                                                inEqual = "="; 
                                                        }
@@ -561,21 +561,21 @@ public class MultiChronopicExecute : EventExecute
 
        public override void MultiChronopicWrite(bool tempTable)
        {
-               Log.WriteLine("----------WRITING A----------");
+               LogB.Information("----------WRITING A----------");
        //      if(writingStarted)
        //              return;
        //      else
        //              writingStarted = true; //only one execution can "get in"
-               Log.WriteLine("----------WRITING B----------");
-
-               Console.WriteLine("cp1 In:" + cp1InStr);
-               Console.WriteLine("cp1 Out:" + cp1OutStr + "\n");
-               Console.WriteLine("cp2 In:" + cp2InStr);
-               Console.WriteLine("cp2 Out:" + cp2OutStr + "\n");
-               Console.WriteLine("cp3 In:" + cp3InStr);
-               Console.WriteLine("cp3 Out:" + cp3OutStr + "\n");
-               Console.WriteLine("cp4 In:" + cp4InStr);
-               Console.WriteLine("cp4 Out:" + cp4OutStr + "\n");
+               LogB.Information("----------WRITING B----------");
+
+               LogB.Information("cp1 In:" + cp1InStr);
+               LogB.Information("cp1 Out:" + cp1OutStr + "\n");
+               LogB.Information("cp2 In:" + cp2InStr);
+               LogB.Information("cp2 Out:" + cp2OutStr + "\n");
+               LogB.Information("cp3 In:" + cp3InStr);
+               LogB.Information("cp3 Out:" + cp3OutStr + "\n");
+               LogB.Information("cp4 In:" + cp4InStr);
+               LogB.Information("cp4 Out:" + cp4OutStr + "\n");
                
 
                /*
diff --git a/src/execute/pulse.cs b/src/execute/pulse.cs
index 7e4ca43..397cc0d 100644
--- a/src/execute/pulse.cs
+++ b/src/execute/pulse.cs
@@ -92,7 +92,7 @@ public class PulseExecute : EventExecute
        
        public override void SimulateInitValues(Random randSent)
        {
-               Log.WriteLine("From execute/pulse.cs");
+               LogB.Information("From execute/pulse.cs");
 
                rand = randSent; //we send the random, because if we create here, the values will be the same 
for each nbew instance
                simulated = true;
diff --git a/src/execute/reactionTime.cs b/src/execute/reactionTime.cs
index a12c635..c320ef1 100644
--- a/src/execute/reactionTime.cs
+++ b/src/execute/reactionTime.cs
@@ -77,7 +77,7 @@ public class ReactionTimeExecute : EventExecute
        
        public override void SimulateInitValues(Random randSent)
        {
-               Log.WriteLine("From execute/reactionTime.cs");
+               LogB.Information("From execute/reactionTime.cs");
 
                rand = randSent; //we send the random, because if we create here, the values will be the same 
for each nbew instance
                simulated = true;
@@ -164,7 +164,7 @@ public class ReactionTimeExecute : EventExecute
                                        if(simulated)
                                                timestamp = simulatedTimeLast * 1000; //conversion to 
milliseconds
 
-                                       Log.Write(string.Format("t1:{0}", timestamp));
+                                       LogB.Information(string.Format("t1:{0}", timestamp));
 
                                        time = timestamp / 1000.0;
                                        write();
diff --git a/src/execute/run.cs b/src/execute/run.cs
index 46a8149..a0af667 100644
--- a/src/execute/run.cs
+++ b/src/execute/run.cs
@@ -98,7 +98,7 @@ public class RunExecute : EventExecute
        
        public override void SimulateInitValues(Random randSent)
        {
-               Log.WriteLine("From execute/run.cs");
+               LogB.Information("From execute/run.cs");
 
                rand = randSent; //we send the random, because if we create here, the values will be the same 
for each nbew instance
                simulated = true;
@@ -113,7 +113,7 @@ public class RunExecute : EventExecute
        
        public override void Manage()
        {
-               Log.WriteLine("MANAGE!!!!");
+               LogB.Debug("MANAGE!!!!");
 
                //boolean to know if chronopic has been disconnected    
                chronopicDisconnected = false;
@@ -123,7 +123,7 @@ public class RunExecute : EventExecute
                else
                        platformState = chronopicInitialValue(cp);
                
-               Log.WriteLine("MANAGE(b)!!!!");
+               LogB.Debug("MANAGE(b)!!!!");
 
                //you can start ON or OFF the platform, 
                //we record always de TF (or time between we abandonate the platform since we arrive)
@@ -176,12 +176,12 @@ public class RunExecute : EventExecute
                cancel = false;
                totallyCancelled = false;
 
-               Log.WriteLine("MANAGE(2)!!!!");
+               LogB.Debug("MANAGE(2)!!!!");
                //start thread
                thread = new Thread(new ThreadStart(waitEvent));
                GLib.Idle.Add (new GLib.IdleHandler (PulseGTK));
                thread.Start(); 
-               Log.WriteLine("MANAGE(3)!!!!");
+               LogB.Debug("MANAGE(3)!!!!");
        }
        
        protected override void waitEvent ()
@@ -204,7 +204,7 @@ public class RunExecute : EventExecute
                        
                        //if (ok) {
                        if (ok && !cancel) {
-                               //Log.WriteLine("timestamp:" + timestamp);
+                               //LogB.Information("timestamp:" + timestamp);
                                if (platformState == Chronopic.Plataforma.ON && loggedState == States.OFF) {
                                        //has arrived
                                        loggedState = States.ON;
@@ -385,7 +385,7 @@ public class RunExecute : EventExecute
 
        protected override void write()
        {
-               Log.WriteLine(string.Format("TIME: {0}", time.ToString()));
+               LogB.Information(string.Format("TIME: {0}", time.ToString()));
                
                /*
                string myStringPush =   Catalog.GetString("Last run") + ": " + RunnerName + " " + 
@@ -882,7 +882,7 @@ public class RunIntervalExecute : RunExecute
 
                                                        feedbackMessage = Catalog.GetString("Run will not be 
recorded. Out of time.");
                                                        needShowFeedbackMessage = true; 
-                                                       Log.WriteLine("Run will not be recorded, 1st track is 
out of time");
+                                                       LogB.Information("Run will not be recorded, 1st track 
is out of time");
        
                                                        //mark for not having problems with cancelled
                                                        cancel = true;
@@ -892,7 +892,7 @@ public class RunIntervalExecute : RunExecute
                                                        //end this piece of code
                                                        return;
                                                } else {
-                                                       Log.WriteLine("Deleted one event out of time");
+                                                       LogB.Information("Deleted one event out of time");
                                                        eventPassed = 
Util.EventPassedFromMaxTime(intervalTimesString, limitAsDouble);
                                                }
                                        }
diff --git a/src/executeAuto.cs b/src/executeAuto.cs
index a5f4daf..1495700 100644
--- a/src/executeAuto.cs
+++ b/src/executeAuto.cs
@@ -185,8 +185,7 @@ public class ExecuteAutoSQL
                if(str == null || str == "")
                        return new List<int>();
 
-               Log.WriteLine("SerieIDsFromStr");
-               Log.WriteLine(str);
+               LogB.Information("SerieIDsFromStr", str);
                string [] strFull = str.Split(new char[] {':'});
                
                List <int>l = new List <int>();
diff --git a/src/exportSession.cs b/src/exportSession.cs
index 9b7644e..1144b42 100644
--- a/src/exportSession.cs
+++ b/src/exportSession.cs
@@ -88,9 +88,9 @@ public class ExportSession
                        }
                        try {
                                if (File.Exists(fileName)) {
-                                       Log.WriteLine(string.Format("File {0} exists with attributes {1}, 
created at {2}", 
+                                       LogB.Warning(string.Format("File {0} exists with attributes {1}, 
created at {2}", 
                                                                fileName, File.GetAttributes(fileName), 
File.GetCreationTime(fileName)));
-                                       Log.WriteLine("Overwrite...");
+                                       LogB.Information("Overwrite...");
                                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are 
you sure you want to overwrite file: "), "", fileName);
                                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_overwrite_file_accepted);
                                } else {
@@ -109,7 +109,7 @@ public class ExportSession
                        }
                }
                else {
-                       Log.WriteLine("cancelled");
+                       LogB.Information("cancelled");
                        //report does not currently send the appBar reference
                        if(formatFile != "report") {
                                new DialogMessage(Constants.MessageTypes.INFO, 
Catalog.GetString("Cancelled."));
@@ -900,7 +900,7 @@ public class ExportSessionCSV : ExportSession
 
        protected override void printFooter()
        {
-               Log.WriteLine( "Correctly exported" );
+               LogB.Information( "Correctly exported" );
                /*
                string myString = Catalog.GetString ("Exported to file: ") + fileName;
                new DialogMessage(Constants.MessageTypes.INFO, myString);
diff --git a/src/genericObjects.cs b/src/genericObjects.cs
index 45dedcd..ddb958e 100644
--- a/src/genericObjects.cs
+++ b/src/genericObjects.cs
@@ -143,7 +143,7 @@ public class IDNameIDDoubleListOfLists
 
                //read every list
                foreach(IDDoubleList ldoublelist in ldoublelistoflists) {
-                       Log.WriteLine(ldoublelist.ToString());
+                       LogB.Information(ldoublelist.ToString());
 
                        //find if exists a record on this list for the uniqueID on lname
                        i = 0;
@@ -167,7 +167,7 @@ public class IDNameIDDoubleListOfLists
 
                //read every list
                foreach(IDDoubleList ldoublelist in ldoublelistoflists) {
-                       Log.WriteLine(ldoublelist.ToString());
+                       LogB.Information(ldoublelist.ToString());
 
                        //find if exists a record on this list for the uniqueID on lname
                        i = 0;
@@ -179,9 +179,9 @@ public class IDNameIDDoubleListOfLists
                                        array[i++] += ":" + d.ToString();
                        }
                }
-               Log.WriteLine("printing at GetArray()");
+               LogB.Information("printing at GetArray()");
                foreach(string str in array)
-                       Log.WriteLine(str);
+                       LogB.Information(str);
 
                return array;
        }
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index d42a518..08c3252 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -809,7 +809,7 @@ public partial class ChronoJumpWindow
        {
                preferences = Preferences.LoadAllFromSqlite();
 
-               Log.WriteLine (string.Format(Catalog.GetString("Chronojump database version file: {0}"), 
+               LogB.Information (string.Format(Catalog.GetString("Chronojump database version file: {0}"), 
                                        preferences.databaseVersion));
 
                checkbutton_allow_finish_rj_after_time.Active = preferences.allowFinishRjAfterTime;
@@ -870,7 +870,7 @@ public partial class ChronoJumpWindow
                report.preferences = preferences;
                report.Progversion = progVersion;
 
-               Log.WriteLine ( Catalog.GetString ("Preferences loaded") );
+               LogB.Information ( Catalog.GetString ("Preferences loaded") );
        }
 
        /*
@@ -1018,7 +1018,7 @@ public partial class ChronoJumpWindow
                                        treeviewMultiChronopicContextMenu(mc);
                                }
                        } else
-                               Log.WriteLine(myTv.ToString());
+                               LogB.Information(myTv.ToString());
                }
        }
 
@@ -1162,11 +1162,11 @@ public partial class ChronoJumpWindow
        private void on_menuitem_server_stats (object o, EventArgs args) {
                if(connectedAndCanI(Constants.ServerActionStats)) {
                        ChronojumpServer myServer = new ChronojumpServer();
-                       Log.WriteLine(myServer.ConnectDatabase());
+                       LogB.SQL(myServer.ConnectDatabase());
 
                        string [] statsServer = myServer.Stats();
 
-                       Log.WriteLine(myServer.DisConnectDatabase());
+                       LogB.SQL(myServer.DisConnectDatabase());
 
                        string [] statsMine = SqliteServer.StatsMine();
 
@@ -1453,7 +1453,7 @@ public partial class ChronoJumpWindow
        }
 
        private void on_treeview_jumps_cursor_changed (object o, EventArgs args) {
-               Log.WriteLine("Cursor changed");
+               LogB.Information("Cursor changed");
                // don't select if it's a person, 
                // is for not confusing with the person treeviews that controls who jumps
                if (myTreeViewJumps.EventSelectedID == 0) {
@@ -1948,7 +1948,7 @@ public partial class ChronoJumpWindow
        }
 
        private void on_treeview_multi_chronopic_cursor_changed (object o, EventArgs args) {
-               Log.WriteLine("Cursor changed");
+               LogB.Information("Cursor changed");
                // don't select if it's a person, 
                // is for not confusing with the person treeviews that controls who does events
                if (myTreeViewMultiChronopic.EventSelectedID == 0) {
@@ -2216,7 +2216,7 @@ public partial class ChronoJumpWindow
                if (o == null)
                        return;
                string myText = UtilGtk.ComboGetActive(combo);
-               Log.WriteLine("Selected: " + myText); 
+               LogB.Information("Selected: " + myText); 
 
                //show extra window options
                on_extra_window_jumps_test_changed(o, args);
@@ -2227,7 +2227,7 @@ public partial class ChronoJumpWindow
                if (o == null)
                        return;
                string myText = UtilGtk.ComboGetActive(combo);
-               Log.WriteLine("Selected: " + myText); 
+               LogB.Information("Selected: " + myText); 
 
                //show extra window options
                on_extra_window_jumps_rj_test_changed(o, args);
@@ -2238,7 +2238,7 @@ public partial class ChronoJumpWindow
                if (o == null)
                        return;
                string myText = UtilGtk.ComboGetActive(combo);
-               Log.WriteLine("Selected: " + myText); 
+               LogB.Information("Selected: " + myText); 
 
                //show extra window options
                on_extra_window_runs_test_changed(o, args);
@@ -2249,7 +2249,7 @@ public partial class ChronoJumpWindow
                if (o == null)
                        return;
                string myText = UtilGtk.ComboGetActive(combo);
-               Log.WriteLine("Selected: " + myText); 
+               LogB.Information("Selected: " + myText); 
 
                //show extra window options
                on_extra_window_runs_interval_test_changed(o, args);
@@ -2348,7 +2348,7 @@ public partial class ChronoJumpWindow
                
 
        private void on_quit2_activate (object o, EventArgs args) {
-               Log.WriteLine("Bye!");
+               LogB.Information("Bye!");
     
                if(chronopicWin.Connected == true) {
                        chronopicWin.SerialPortsClose();
@@ -2365,14 +2365,13 @@ public partial class ChronoJumpWindow
                        File.Move(Util.GetDatabaseTempDir() + Path.DirectorySeparatorChar + "chronojump.db",
                                Util.GetDatabaseDir() + Path.DirectorySeparatorChar + "chronojump.db");
                
-               Log.WriteLine("Bye2!");
+               LogB.Information("Bye2!");
                
                Log.End();
 
                Application.Quit();
                
                //Environment.Exit(Environment.ExitCode);
-               //Log.WriteLine("Bye5!");
        }
        
        /* ---------------------------------------------------------
@@ -2381,7 +2380,7 @@ public partial class ChronoJumpWindow
         */
 
        private void on_new_activate (object o, EventArgs args) {
-               Log.WriteLine("new session");
+               LogB.Information("new session");
                sessionAddEditWin = SessionAddEditWindow.Show(app1, new Session());
                sessionAddEditWin.Button_accept.Clicked += new EventHandler(on_new_session_accepted);
        }
@@ -2426,7 +2425,7 @@ public partial class ChronoJumpWindow
        }
        
        private void on_edit_session_activate (object o, EventArgs args) {
-               Log.WriteLine("edit session");
+               LogB.Information("edit session");
                sessionAddEditWin = SessionAddEditWindow.Show(app1, currentSession);
                sessionAddEditWin.Button_accept.Clicked += new EventHandler(on_edit_session_accepted);
        }
@@ -2444,7 +2443,7 @@ public partial class ChronoJumpWindow
        }
        
        private void on_open_activate (object o, EventArgs args) {
-               Log.WriteLine("open session");
+               LogB.Information("open session");
                sessionLoadWin = SessionLoadWindow.Show(app1);
                sessionLoadWin.Button_accept.Clicked += new EventHandler(on_load_session_accepted);
                //on_load_session_accepted(o, args);
@@ -2488,7 +2487,7 @@ public partial class ChronoJumpWindow
        
        
        private void on_delete_session_activate (object o, EventArgs args) {
-               Log.WriteLine("delete session");
+               LogB.Information("delete session");
                ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you want to 
delete the current session"), "", Catalog.GetString("and all the session tests?"));
                confirmWin.Button_accept.Clicked += new EventHandler(on_delete_session_accepted);
        }
@@ -2520,7 +2519,7 @@ public partial class ChronoJumpWindow
         */
        
        private void on_recuperate_person_clicked (object o, EventArgs args) {
-               Log.WriteLine("recuperate person");
+               LogB.Information("recuperate person");
                personRecuperateWin = PersonRecuperateWindow.Show(app1, currentSession, 
preferences.digitsNumber, checkbutton_video);
                personRecuperateWin.FakeButtonDone.Clicked += new EventHandler(on_recuperate_person_accepted);
        }
@@ -2543,7 +2542,7 @@ public partial class ChronoJumpWindow
        }
                
        private void on_recuperate_persons_from_session_clicked (object o, EventArgs args) {
-               Log.WriteLine("recuperate persons from other session");
+               LogB.Information("recuperate persons from other session");
                personsRecuperateFromOtherSessionWin = PersonsRecuperateFromOtherSessionWindow.Show(app1, 
currentSession, checkbutton_video);
                personsRecuperateFromOtherSessionWin.FakeButtonDone.Clicked += new 
EventHandler(on_recuperate_persons_from_session_accepted);
        }
@@ -2648,7 +2647,7 @@ public partial class ChronoJumpWindow
        }
        
        private void on_edit_current_person_clicked (object o, EventArgs args) {
-               Log.WriteLine("modify person");
+               LogB.Information("modify person");
 
                //personAddModifyWin = PersonAddModifyWindow.Show(app1, currentSession, 
currentPerson.UniqueID, preferences.digitsNumber);
                personAddModifyWin = PersonAddModifyWindow.Show(app1, currentSession, currentPerson, 
@@ -2695,7 +2694,7 @@ public partial class ChronoJumpWindow
        
        
        private void on_delete_current_person_from_session_clicked (object o, EventArgs args) {
-               Log.WriteLine("delete current person from this session");
+               LogB.Information("delete current person from this session");
                ConfirmWindow confirmWin = ConfirmWindow.Show(
                                Catalog.GetString("Are you sure you want to delete the current person and all 
his/her tests (jumps, runs, pulses, ...) from this session?\n(His/her personal data and tests in other 
sessions will remain intact.)"), "", 
                                Catalog.GetString("Current Person: ") + currentPerson.Name);
@@ -2871,7 +2870,7 @@ public partial class ChronoJumpWindow
                //https://bugzilla.xamarin.com/show_bug.cgi?id=15514
                if(! UtilAll.IsWindows ()) {
                        if(! File.Exists(chronopicWin.GetContactsFirstPort())) {
-                               Log.WriteLine("Chronopic has been disconnected");
+                               LogB.Information("Chronopic has been disconnected");
                                createChronopicWindow(true);
                                chronopicWin.Connected = false;
                                return;
@@ -2881,7 +2880,7 @@ public partial class ChronoJumpWindow
                Chronopic.Plataforma ps;
                bool ok = (chronopicWin.CP).Read_platform(out ps);
                if(!ok) {
-                       Log.WriteLine("Chronopic has been disconnected");
+                       LogB.Information("Chronopic has been disconnected");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                        return;
@@ -2893,7 +2892,7 @@ public partial class ChronoJumpWindow
                        ca = new ChronopicAutoCheck();
                        string chronopicVersion = ca.Read(chronopicWin.SP);
                } catch {
-                       Log.WriteLine("Could not read from Chronopic");
+                       LogB.Information("Could not read from Chronopic");
                        return;
                }
                
@@ -2915,7 +2914,7 @@ public partial class ChronoJumpWindow
                                else if(ms == "10 ms")
                                        label_chronopics_multitest.Text = "[" + Catalog.GetString("Runs") + 
"]";
                        } catch {
-                               Log.WriteLine("Could not change debounce");
+                               LogB.Error("Could not change debounce");
                        }
                }
        }
@@ -3011,7 +3010,7 @@ public partial class ChronoJumpWindow
 
        int videoDeviceNum = 0; 
        private void videoCapturePrepare(bool showErrorMessage) {
-               Log.WriteLine("videoCapturePPPPPPPPPPPPPPPPPrepare");
+               LogB.Information("videoCapturePPPPPPPPPPPPPPPPPrepare");
                List<LongoMatch.Video.Utils.Device> devices = 
LongoMatch.Video.Utils.Device.ListVideoDevices();
                if(devices.Count == 0) {
                        if(showErrorMessage)
@@ -3031,9 +3030,9 @@ public partial class ChronoJumpWindow
                s.Height = 288;
                
                foreach(LongoMatch.Video.Utils.Device dev in devices){
-                       Log.WriteLine(dev.ID.ToString());
-                       Log.WriteLine(dev.IDProperty.ToString());
-                       Log.WriteLine(dev.DeviceType.ToString());
+                       LogB.Information(dev.ID.ToString());
+                       LogB.Information(dev.IDProperty.ToString());
+                       LogB.Information(dev.DeviceType.ToString());
                }
                        
                s.DeviceID = devices[videoDeviceNum].ID;
@@ -3158,7 +3157,7 @@ public partial class ChronoJumpWindow
        {
                event_execute_ButtonCancel.Clicked -= new EventHandler(on_cancel_clicked);
 
-               Console.WriteLine("cancel clicked one");
+               LogB.Information("cancel clicked one");
 
                //this will cancel jumps or runs
                currentEventExecute.Cancel = true;
@@ -3179,7 +3178,7 @@ public partial class ChronoJumpWindow
        
        private void on_cancel_multi_clicked (object o, EventArgs args) 
        {
-               Console.WriteLine("cancel multi clicked one");
+               LogB.Information("cancel multi clicked one");
 
                //this will cancel jumps or runs
                currentEventExecute.Cancel = true;
@@ -3194,9 +3193,9 @@ public partial class ChronoJumpWindow
        private void checkCancelTotally (object o, EventArgs args) 
        {
                if(currentEventExecute.TotallyCancelled) 
-                       Log.WriteLine("totallyCancelled");
+                       LogB.Information("totallyCancelled");
                else {
-                       Log.Write("NOT-totallyCancelled ");
+                       LogB.Information("NOT-totallyCancelled ");
                        errorWin = ErrorWindow.Show(Catalog.GetString("Please, touch the contact platform for 
full cancelling.\nThen press button\n"));
                        errorWin.Button_accept.Clicked += new EventHandler(checkCancelTotally);
                }
@@ -3220,7 +3219,7 @@ public partial class ChronoJumpWindow
                }
 
                if(needCancel1 || needCancel2 || needCancel3 || needCancel4) {
-//                     Log.Write("NOT-totallyCancelled ");
+//                     LogB.Information("NOT-totallyCancelled ");
                        string cancelStr = "";
                        string sep = "";
                        if(needCancel1) {
@@ -3251,9 +3250,9 @@ public partial class ChronoJumpWindow
                currentEventExecute.Finish = true;
                
                //unhide event buttons for next event
-Log.WriteLine("calling sensitiveGuiEventDone from on_finish_clicked");
+LogB.Information("calling sensitiveGuiEventDone from on_finish_clicked");
                sensitiveGuiEventDone();
-Log.WriteLine("called sensitiveGuiEventDone from on_finish_clicked");
+LogB.Information("called sensitiveGuiEventDone from on_finish_clicked");
 
                if(chronopicWin.Connected)
                        checkFinishTotally(o, args);
@@ -3278,11 +3277,11 @@ Log.WriteLine("called sensitiveGuiEventDone from on_finish_clicked");
                
                //runA is not called for this, because it ends different
                //and there's a message on gui/eventExecute.cs for runA 
-               Console.WriteLine("RR1");
+               LogB.Debug("RR1");
                if(currentMultiChronopicType.Name != Constants.RunAnalysisName && chronopicWin.Connected) {
                        checkFinishMultiTotally(o, args);
                }
-               Console.WriteLine("RR2");
+               LogB.Debug("RR2");
                
                //let update stats
                //if(createdStatsWin)
@@ -3297,9 +3296,9 @@ Log.WriteLine("called sensitiveGuiEventDone from on_finish_clicked");
        private void checkFinishTotally (object o, EventArgs args) 
        {
                if(currentEventExecute.TotallyFinished) 
-                       Log.WriteLine("totallyFinished");
+                       LogB.Information("totallyFinished");
                else {
-                       Log.Write("NOT-totallyFinished ");
+                       LogB.Information("NOT-totallyFinished ");
                        errorWin = ErrorWindow.Show(Catalog.GetString("Please, touch the contact platform for 
full finishing.\nThen press this button:\n"));
                        errorWin.Button_accept.Clicked += new EventHandler(checkFinishTotally);
                }
@@ -3314,24 +3313,24 @@ Log.WriteLine("called sensitiveGuiEventDone from on_finish_clicked");
                bool needFinish3 = false;
                bool needFinish4 = false;
                        
-               Console.WriteLine("cfmt 0");
+               LogB.Information("cfmt 0");
                needFinish1 = !currentEventExecute.TotallyFinishedMulti1;
                if(currentEventExecute.Chronopics > 1) {
-                       Console.WriteLine("cfmt 1");
+                       LogB.Information("cfmt 1");
                        needFinish2 = !currentEventExecute.TotallyFinishedMulti2;
                        if(currentEventExecute.Chronopics > 2) {
-                               Console.WriteLine("cfmt 2");
+                               LogB.Information("cfmt 2");
                                needFinish3 = !currentEventExecute.TotallyFinishedMulti3;
                                if(currentEventExecute.Chronopics > 3) {
-                                       Console.WriteLine("cfmt 3");
+                                       LogB.Information("cfmt 3");
                                        needFinish4 = !currentEventExecute.TotallyFinishedMulti4;
                                }
                        }
                }
-               Console.WriteLine("cfmt 4");
+               LogB.Information("cfmt 4");
 
                if(needFinish1 || needFinish2 || needFinish3 || needFinish4) {
-//                     Log.Write("NOT-totallyFinishled ");
+//                     LogB.Information("NOT-totallyFinishled ");
                        string cancelStr = "";
                        string sep = "";
                        if(needFinish1) {
@@ -3351,22 +3350,21 @@ Log.WriteLine("called sensitiveGuiEventDone from on_finish_clicked");
                                sep = ", ";
                        }
                
-                       Console.WriteLine("cfmt 5");
+                       LogB.Information("cfmt 5");
                        //try here because maybe solves problems in runAnalysis when seem to update the 
eventExecuteWindow at the same time as tries to show this errorWindow
                                errorWin = ErrorWindow.Show(string.Format(
                                                        Catalog.GetString("Please, touch the contact platform 
on Chronopic/s [{0}] for full finishing.") + 
                                                        "\n" + Catalog.GetString("Then press this 
button:\n"), cancelStr));
-                               Console.WriteLine("cfmt 6");
+                               LogB.Information("cfmt 6");
                                errorWin.Button_accept.Clicked += new EventHandler(checkFinishMultiTotally);
-                               Console.WriteLine("cfmt 7");
+                               LogB.Information("cfmt 7");
                        //}
                } else {
-                       Log.WriteLine("totallyFinished");
+                       LogB.Information("totallyFinished");
                        /*
                        //call write here, because if done in execute/MultiChronopic, will be called n times 
if n chronopics are working
                        currentEventExecute.MultiChronopicWrite(false);
                        currentMultiChronopic = (MultiChronopic) currentEventExecute.EventDone;
-Console.WriteLine("W");
                
 
                        //if this multichronopic has more chronopics than other in session, then reload 
treeview, else simply add
@@ -3375,7 +3373,6 @@ Console.WriteLine("W");
                                fillTreeView_multi_chronopic();
                        } else
                                myTreeViewMultiChronopic.Add(currentPerson.Name, currentMultiChronopic);
-Console.WriteLine("X");
                        
                        //since 0.7.4.1 when test is done, treeview select it. action event button have to be 
shown 
                        showHideActionEventButtons(true, Constants.MultiChronopicName); //show
@@ -3393,7 +3390,7 @@ Console.WriteLine("X");
                //https://bugzilla.xamarin.com/show_bug.cgi?id=15514
                if(! UtilAll.IsWindows() && chronopicWin.Connected) {
                        if(! File.Exists(chronopicWin.GetContactsFirstPort())) {
-                               Log.WriteLine("Chronopic has been disconnected");
+                               LogB.Information("Chronopic has been disconnected");
                                createChronopicWindow(true);
                                chronopicWin.Connected = false;
                                return;
@@ -3500,7 +3497,7 @@ Console.WriteLine("X");
                                myType = new PulseType(eventName);
                        else if (eventTypeString == EventType.Types.MULTICHRONOPIC.ToString()) 
                                myType = new MultiChronopicType(eventName);
-                       else Log.WriteLine("Error on eventTypeHasLongDescription");
+                       else LogB.Error("Error on eventTypeHasLongDescription");
 
                        if(myType.HasLongDescription)
                                return true;
@@ -3617,9 +3614,7 @@ Console.WriteLine("X");
 
        private void on_jump_finished (object o, EventArgs args)
        {
-Log.WriteLine("DDD");
                currentEventExecute.FakeButtonFinished.Clicked -= new EventHandler(on_jump_finished);
-Log.WriteLine("DDD 1");
        
                //test can be deleted if not cancelled
                button_delete_this_test.Sensitive = ! currentEventExecute.Cancel;
@@ -3672,7 +3667,7 @@ Log.WriteLine("DDD 1");
                                sensitiveGuiYesEvent();
                } 
                else if( currentEventExecute.ChronopicDisconnected ) {
-                       Log.WriteLine("DISCONNECTED gui/cj");
+                       LogB.Information("DISCONNECTED gui/cj");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                }
@@ -3686,16 +3681,15 @@ Log.WriteLine("DDD 1");
                        execute_auto_select();
                        sensitiveGuiAutoExecuteOrWait (false);
                }
-Log.WriteLine("DDD 2");
        }
                
        private void on_test_finished_can_touch_gtk (object o, EventArgs args)
        {
                currentEventExecute.FakeButtonThreadDyed.Clicked -= new 
EventHandler(on_test_finished_can_touch_gtk);
-               Log.WriteLine(" cantouch1 ");
+               LogB.Information(" cantouch1 ");
                if(! execute_auto_doing)
                        sensitiveGuiEventDone();
-               Log.WriteLine(" cantouch3 ");
+               LogB.Information(" cantouch3 ");
 
                if ( ! currentEventExecute.Cancel )
                        event_execute_progressbar_time.Fraction = 1; 
@@ -3796,7 +3790,7 @@ Log.WriteLine("DDD 2");
                
        private void on_jump_rj_finished (object o, EventArgs args) 
        {
-               Log.WriteLine("ON JUMP RJ FINISHED");
+               LogB.Information("ON JUMP RJ FINISHED");
                
                currentEventExecute.FakeButtonFinished.Clicked -= new EventHandler(on_jump_rj_finished);
                
@@ -3851,7 +3845,7 @@ Log.WriteLine("DDD 2");
                        event_execute_LabelEventValue = currentJumpRj.Jumps;
                } 
                else if( currentEventExecute.ChronopicDisconnected ) {
-                       Log.WriteLine("DISCONNECTED gui/cj");
+                       LogB.Information("DISCONNECTED gui/cj");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                }
@@ -3992,7 +3986,7 @@ Log.WriteLine("DDD 2");
                        event_execute_LabelTimeValue = currentRun.Time;
                }
                else if( currentEventExecute.ChronopicDisconnected ) {
-                       Log.WriteLine("DISCONNECTED gui/cj");
+                       LogB.Information("DISCONNECTED gui/cj");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                }
@@ -4009,7 +4003,7 @@ Log.WriteLine("DDD 2");
        
        private void on_run_interval_activate (object o, EventArgs args)
        {
-               Log.WriteLine("run interval accepted");
+               LogB.Information("run interval accepted");
                
                //if distance can be always different in this run,
                //show values selected in runExtraWin
@@ -4137,7 +4131,7 @@ Log.WriteLine("DDD 2");
                        event_execute_LabelEventValue = currentRunInterval.Tracks;
                }
                else if( currentEventExecute.ChronopicDisconnected ) {
-                       Log.WriteLine("DISCONNECTED gui/cj");
+                       LogB.Information("DISCONNECTED gui/cj");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                }
@@ -4237,7 +4231,7 @@ Log.WriteLine("DDD 2");
                        sensitiveGuiYesEvent();
                }
                else if( currentEventExecute.ChronopicDisconnected ) {
-                       Log.WriteLine("DISCONNECTED gui/cj");
+                       LogB.Information("DISCONNECTED gui/cj");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                }
@@ -4256,7 +4250,7 @@ Log.WriteLine("DDD 2");
 
        private void on_pulse_activate (object o, EventArgs args)
        {
-               Log.WriteLine("pulse accepted");
+               LogB.Information("pulse accepted");
        
                double pulseStep = 0;
                int totalPulses = 0;
@@ -4322,7 +4316,7 @@ Log.WriteLine("DDD 2");
 
        private void on_pulse_finished (object o, EventArgs args) 
        {
-               Log.WriteLine("pulse finished");
+               LogB.Information("pulse finished");
                
                currentEventExecute.FakeButtonFinished.Clicked -= new EventHandler(on_pulse_finished);
                
@@ -4367,7 +4361,7 @@ Log.WriteLine("DDD 2");
                        event_execute_LabelTimeValue = Util.GetTotalTime(currentPulse.TimesString);
                }
                else if( currentEventExecute.ChronopicDisconnected ) {
-                       Log.WriteLine("DISCONNECTED gui/cj");
+                       LogB.Information("DISCONNECTED gui/cj");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                }
@@ -4477,9 +4471,9 @@ Log.WriteLine("DDD 2");
        }
 
        private void chronopicEncoderLabels(bool colorize) {
-               Log.WriteLine("at chronopicEncoderLabels");
+               LogB.Information("at chronopicEncoderLabels");
                string encoderPort = chronopicWin.GetEncoderPort();
-               Log.WriteLine(encoderPort);
+               LogB.Information("encoderPort:", encoderPort);
 
                if(encoderPort != null && encoderPort != "" && encoderPort != Util.GetDefaultPort())
                        label_chronopic_encoder.Text = Catalog.GetString("Encoder connected");
@@ -4494,7 +4488,7 @@ Log.WriteLine("DDD 2");
 
 
        private void on_multi_chronopic_start_clicked (object o, EventArgs args) {
-               Log.WriteLine("multi chronopic accepted");
+               LogB.Information("multi chronopic accepted");
                
                bool syncAvailable = false;
                if(currentMultiChronopicType.SyncAvailable && extra_window_check_multichronopic_sync.Active)
@@ -4608,7 +4602,7 @@ Log.WriteLine("DDD 2");
                        //              Catalog.GetString("This Run Analysis is not valid because there are 
no strides."));
                        currentEventExecute.RunANoStrides();
                else if ( ! currentEventExecute.Cancel ) {
-Console.WriteLine("T");
+LogB.Debug("T");
                        /*
                           on runAnalysis test, when cp1 ends, run ends,
                           but cp2 is still waiting event
@@ -4619,12 +4613,12 @@ Console.WriteLine("T");
                        //on_finish_multi_clicked(o, args);
                        //this produces also a crash:
                        //new DialogMessage(Constants.MessageTypes.INFO, "Please, touch a platform now.");
-Console.WriteLine("U");
+LogB.Debug("U");
                        //call write here, because if done in execute/MultiChronopic, will be called n times 
if n chronopics are working
                        currentEventExecute.MultiChronopicWrite(false);
-Console.WriteLine("V");
+LogB.Debug("V");
                        currentMultiChronopic = (MultiChronopic) currentEventExecute.EventDone;
-Console.WriteLine("W");
+LogB.Debug("W");
                        //move video file if exists
                        if(preferences.videoOn)
                                if(! Util.CopyTempVideo(currentSession.UniqueID, 
@@ -4634,7 +4628,7 @@ Console.WriteLine("W");
                        //this produces also a crash:
                        //new DialogMessage(Constants.MessageTypes.INFO, "Please, touch a platform now.");
 
-Console.WriteLine("W2");
+LogB.Debug("W2");
                        
                        //if this multichronopic has more chronopics than other in session, then reload 
treeview, else simply add
                        if(currentMultiChronopic.CPs() != 
SqliteMultiChronopic.MaxCPs(currentSession.UniqueID)) {
@@ -4642,7 +4636,7 @@ Console.WriteLine("W2");
                                fillTreeView_multi_chronopic();
                        } else
                                myTreeViewMultiChronopic.Add(currentPerson.Name, currentMultiChronopic);
-Console.WriteLine("X");
+LogB.Debug("X");
                        
                        //since 0.7.4.1 when test is done, treeview select it. action event button have to be 
shown 
                        showHideActionEventButtons(true, Constants.MultiChronopicName); //show
@@ -4651,7 +4645,7 @@ Console.WriteLine("X");
                        sensitiveGuiYesEvent();
                }
                else if( currentEventExecute.ChronopicDisconnected ) {
-                       Log.WriteLine("DISCONNECTED gui/cj");
+                       LogB.Information("DISCONNECTED gui/cj");
                        createChronopicWindow(true);
                        chronopicWin.Connected = false;
                }
@@ -4665,7 +4659,7 @@ Console.WriteLine("X");
         */
        
        private void on_update_clicked (object o, EventArgs args) {
-               Log.WriteLine("--On_update_clicked--");
+               LogB.Information("--On_update_clicked--");
                try {
                        switch (currentEventType.Type) {
                                case EventType.Types.JUMP:
@@ -4738,7 +4732,7 @@ Console.WriteLine("X");
 
        private void on_edit_selected_jump_clicked (object o, EventArgs args) {
                //notebooks_change(0); see "notebooks_change sqlite problem"
-               Log.WriteLine("Edit selected jump (normal)");
+               LogB.Information("Edit selected jump (normal)");
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person (check also if it's not a individual 
RJ, the pass the parent RJ)
                if (myTreeViewJumps.EventSelectedID > 0) {
@@ -4754,7 +4748,7 @@ Console.WriteLine("X");
        
        private void on_edit_selected_jump_rj_clicked (object o, EventArgs args) {
                //notebooks_change(1); see "notebooks_change sqlite problem"
-               Log.WriteLine("Edit selected jump (RJ)");
+               LogB.Information("Edit selected jump (RJ)");
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person (check also if it's not a individual 
RJ, the pass the parent RJ)
                if (myTreeViewJumpsRj.EventSelectedID > 0) {
@@ -4769,7 +4763,7 @@ Console.WriteLine("X");
        }
        
        private void on_edit_selected_jump_accepted (object o, EventArgs args) {
-               Log.WriteLine("edit selected jump accepted");
+               LogB.Information("edit selected jump accepted");
        
                Jump myJump = SqliteJump.SelectJumpData( myTreeViewJumps.EventSelectedID, false );
 
@@ -4792,7 +4786,7 @@ Console.WriteLine("X");
        }
        
        private void on_edit_selected_jump_rj_accepted (object o, EventArgs args) {
-               Log.WriteLine("edit selected jump RJ accepted");
+               LogB.Information("edit selected jump RJ accepted");
        
                JumpRj myJump = SqliteJumpRj.SelectJumpData( "jumpRj", myTreeViewJumpsRj.EventSelectedID, 
false );
                
@@ -4816,7 +4810,7 @@ Console.WriteLine("X");
        
        private void on_edit_selected_run_clicked (object o, EventArgs args) {
                //notebooks_change(2); see "notebooks_change sqlite problem"
-               Log.WriteLine("Edit selected run (normal)");
+               LogB.Information("Edit selected run (normal)");
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person (check also if it's not a individual 
RJ, the pass the parent RJ)
                if (myTreeViewRuns.EventSelectedID > 0) {
@@ -4833,7 +4827,7 @@ Console.WriteLine("X");
        
        private void on_edit_selected_run_interval_clicked (object o, EventArgs args) {
                //notebooks_change(3); see "notebooks_change sqlite problem"
-               Log.WriteLine("Edit selected run interval");
+               LogB.Information("Edit selected run interval");
                //1.- check that there's a line selected
                //2.- check that this line is a run and not a person (check also if it's not a individual 
subrun, the pass the parent run)
                if (myTreeViewRunsInterval.EventSelectedID > 0) {
@@ -4848,7 +4842,7 @@ Console.WriteLine("X");
        }
        
        private void on_edit_selected_run_accepted (object o, EventArgs args) {
-               Log.WriteLine("edit selected run accepted");
+               LogB.Information("edit selected run accepted");
                
                Run myRun = SqliteRun.SelectRunData( myTreeViewRuns.EventSelectedID, false );
                
@@ -4865,7 +4859,7 @@ Console.WriteLine("X");
        }
        
        private void on_edit_selected_run_interval_accepted (object o, EventArgs args) {
-               Log.WriteLine("edit selected run interval accepted");
+               LogB.Information("edit selected run interval accepted");
                
                RunInterval myRun = SqliteRunInterval.SelectRunData( Constants.RunIntervalTable, 
myTreeViewRunsInterval.EventSelectedID, false );
 
@@ -4883,7 +4877,7 @@ Console.WriteLine("X");
 
        private void on_edit_selected_reaction_time_clicked (object o, EventArgs args) {
                //notebooks_change(4); see "notebooks_change sqlite problem"
-               Log.WriteLine("Edit selected reaction time");
+               LogB.Information("Edit selected reaction time");
                //1.- check that there's a line selected
                //2.- check that this line is a event and not a person
                if (myTreeViewReactionTimes.EventSelectedID > 0) {
@@ -4898,7 +4892,7 @@ Console.WriteLine("X");
        }
        
        private void on_edit_selected_reaction_time_accepted (object o, EventArgs args) {
-               Log.WriteLine("edit selected reaction time accepted");
+               LogB.Information("edit selected reaction time accepted");
                
                ReactionTime myRT = SqliteReactionTime.SelectReactionTimeData( 
myTreeViewReactionTimes.EventSelectedID, false);
 
@@ -4913,7 +4907,7 @@ Console.WriteLine("X");
        
        private void on_edit_selected_pulse_clicked (object o, EventArgs args) {
                //notebooks_change(5); see "notebooks_change sqlite problem"
-               Log.WriteLine("Edit selected pulse");
+               LogB.Information("Edit selected pulse");
                //1.- check that there's a line selected
                //2.- check that this line is a event and not a person
                if (myTreeViewPulses.EventSelectedID > 0) {
@@ -4928,7 +4922,7 @@ Console.WriteLine("X");
        }
        
        private void on_edit_selected_pulse_accepted (object o, EventArgs args) {
-               Log.WriteLine("edit selected pulse accepted");
+               LogB.Information("edit selected pulse accepted");
                
                Pulse myPulse = SqlitePulse.SelectPulseData( myTreeViewPulses.EventSelectedID, false );
 
@@ -4943,7 +4937,7 @@ Console.WriteLine("X");
        
        private void on_edit_selected_multi_chronopic_clicked (object o, EventArgs args) {
                //notebooks_change(6); see "notebooks_change sqlite problem"
-               Log.WriteLine("Edit selected multi chronopic");
+               LogB.Information("Edit selected multi chronopic");
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person (check also if it's not a individual 
RJ, the pass the parent RJ)
                if (myTreeViewMultiChronopic.EventSelectedID > 0) {
@@ -4958,7 +4952,7 @@ Console.WriteLine("X");
        }
 
        private void on_edit_selected_multi_chronopic_accepted (object o, EventArgs args) {
-               Log.WriteLine("edit selected multi chronopic accepted");
+               LogB.Information("edit selected multi chronopic accepted");
        
                MultiChronopic mc = SqliteMultiChronopic.SelectMultiChronopicData( 
myTreeViewMultiChronopic.EventSelectedID, false );
                
@@ -5142,10 +5136,10 @@ Console.WriteLine("X");
        
        private void on_delete_selected_jump_clicked (object o, EventArgs args) {
                //notebooks_change(0); see "notebooks_change sqlite problem"
-               Log.WriteLine("delete this jump (normal)");
+               LogB.Information("delete this jump (normal)");
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person
-               Log.WriteLine(myTreeViewJumps.EventSelectedID.ToString());
+               LogB.Information(myTreeViewJumps.EventSelectedID.ToString());
                if (myTreeViewJumps.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
@@ -5159,7 +5153,7 @@ Console.WriteLine("X");
        
        private void on_delete_selected_jump_rj_clicked (object o, EventArgs args) {
                //notebooks_change(1); see "notebooks_change sqlite problem"
-               Log.WriteLine("delete this reactive jump");
+               LogB.Information("delete this reactive jump");
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person (check also if it's not a individual 
RJ, the pass the parent RJ)
                if (myTreeViewJumpsRj.EventSelectedID > 0) {
@@ -5175,7 +5169,7 @@ Console.WriteLine("X");
        }
        
        private void on_delete_selected_jump_accepted (object o, EventArgs args) {
-               Log.WriteLine("accept delete this jump");
+               LogB.Information("accept delete this jump");
                int id = myTreeViewJumps.EventSelectedID;
                
                Sqlite.Delete(false, Constants.JumpTable, id);
@@ -5207,7 +5201,7 @@ Console.WriteLine("X");
        }
 
        private void on_delete_selected_jump_rj_accepted (object o, EventArgs args) {
-               Log.WriteLine("accept delete this jump");
+               LogB.Information("accept delete this jump");
                int id = myTreeViewJumpsRj.EventSelectedID;
                
                Sqlite.Delete(false, Constants.JumpRjTable, id);
@@ -5230,7 +5224,7 @@ Console.WriteLine("X");
        
        private void on_delete_selected_run_clicked (object o, EventArgs args) {
                //notebooks_change(2); see "notebooks_change sqlite problem"
-               Log.WriteLine("delete this run (normal)");
+               LogB.Information("delete this run (normal)");
                
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person
@@ -5248,7 +5242,7 @@ Console.WriteLine("X");
        
        private void on_delete_selected_run_interval_clicked (object o, EventArgs args) {
                //notebooks_change(3); see "notebooks_change sqlite problem"
-               Log.WriteLine("delete this run interval");
+               LogB.Information("delete this run interval");
                //1.- check that there's a line selected
                //2.- check that this line is a run and not a person (check also if it's a subrun, pass the 
parent run)
                if (myTreeViewRunsInterval.EventSelectedID > 0) {
@@ -5264,7 +5258,7 @@ Console.WriteLine("X");
        }
 
        private void on_delete_selected_run_accepted (object o, EventArgs args) {
-               Log.WriteLine("accept delete this run");
+               LogB.Information("accept delete this run");
                int id = myTreeViewRuns.EventSelectedID;
                
                Sqlite.Delete(false, Constants.RunTable, id);
@@ -5286,7 +5280,7 @@ Console.WriteLine("X");
        }
 
        private void on_delete_selected_run_interval_accepted (object o, EventArgs args) {
-               Log.WriteLine("accept delete this run");
+               LogB.Information("accept delete this run");
                int id = myTreeViewRunsInterval.EventSelectedID;
                
                Sqlite.Delete(false, Constants.RunIntervalTable, id);
@@ -5309,11 +5303,11 @@ Console.WriteLine("X");
        
        private void on_delete_selected_reaction_time_clicked (object o, EventArgs args) {
                //notebooks_change(4); see "notebooks_change sqlite problem"
-               Log.WriteLine("delete this reaction time");
+               LogB.Information("delete this reaction time");
                
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person
-               Log.WriteLine(myTreeViewReactionTimes.EventSelectedID.ToString());
+               LogB.Information(myTreeViewReactionTimes.EventSelectedID.ToString());
                if (myTreeViewReactionTimes.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
@@ -5326,7 +5320,7 @@ Console.WriteLine("X");
        }
                
        private void on_delete_selected_reaction_time_accepted (object o, EventArgs args) {
-               Log.WriteLine("accept delete this reaction time");
+               LogB.Information("accept delete this reaction time");
                int id = myTreeViewReactionTimes.EventSelectedID;
                
                Sqlite.Delete(false, Constants.ReactionTimeTable, id);
@@ -5346,11 +5340,11 @@ Console.WriteLine("X");
 
        private void on_delete_selected_pulse_clicked (object o, EventArgs args) {
                //notebooks_change(5); see "notebooks_change sqlite problem"
-               Log.WriteLine("delete this pulse");
+               LogB.Information("delete this pulse");
                
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person
-               Log.WriteLine(myTreeViewPulses.EventSelectedID.ToString());
+               LogB.Information(myTreeViewPulses.EventSelectedID.ToString());
                if (myTreeViewPulses.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
@@ -5363,7 +5357,7 @@ Console.WriteLine("X");
        }
                
        private void on_delete_selected_pulse_accepted (object o, EventArgs args) {
-               Log.WriteLine("accept delete this pulse");
+               LogB.Information("accept delete this pulse");
                int id = myTreeViewPulses.EventSelectedID;
                
                Sqlite.Delete(false, Constants.PulseTable, id);
@@ -5383,7 +5377,7 @@ Console.WriteLine("X");
 
        private void on_delete_selected_multi_chronopic_clicked (object o, EventArgs args) {
                //notebooks_change(6); see "notebooks_change sqlite problem"
-               Log.WriteLine("delete this multi chronopic");
+               LogB.Information("delete this multi chronopic");
                //1.- check that there's a line selected
                //2.- check that this line is a test and not a person (check also if it's not a individual 
mc, then pass the parent mc)
                if (myTreeViewMultiChronopic.EventSelectedID > 0) {
@@ -5398,7 +5392,7 @@ Console.WriteLine("X");
        }
        
        private void on_delete_selected_multi_chronopic_accepted (object o, EventArgs args) {
-               Log.WriteLine("accept delete this multi chronopic");
+               LogB.Information("accept delete this multi chronopic");
                int id = myTreeViewMultiChronopic.EventSelectedID;
                
                Sqlite.Delete(false, Constants.MultiChronopicTable, id);
@@ -5426,21 +5420,21 @@ Console.WriteLine("X");
 
        
        private void on_jump_simple_type_add_clicked (object o, EventArgs args) {
-               Log.WriteLine("Add simple new jump type");
+               LogB.Information("Add simple new jump type");
                        
                jumpTypeAddWin = JumpTypeAddWindow.Show(app1, true); //is simple
                jumpTypeAddWin.FakeButtonAccept.Clicked += new EventHandler(on_jump_type_add_accepted);
        }
        
        private void on_jump_reactive_type_add_clicked (object o, EventArgs args) {
-               Log.WriteLine("Add reactive new jump type");
+               LogB.Information("Add reactive new jump type");
                        
                jumpTypeAddWin = JumpTypeAddWindow.Show(app1, false); //is reactive
                jumpTypeAddWin.FakeButtonAccept.Clicked += new EventHandler(on_jump_type_add_accepted);
        }
        
        private void on_jump_type_add_accepted (object o, EventArgs args) {
-               Log.WriteLine("ACCEPTED Add new jump type");
+               LogB.Information("ACCEPTED Add new jump type");
                if(jumpTypeAddWin.InsertedSimple) {
                        createComboSelectJumps(false); //this will update also the selectJumpsString
 
@@ -5462,21 +5456,21 @@ Console.WriteLine("X");
        }
 
        private void on_run_simple_type_add_activate (object o, EventArgs args) {
-               Log.WriteLine("Add simple new run type");
+               LogB.Information("Add simple new run type");
                        
                runTypeAddWin = RunTypeAddWindow.Show(app1, true); //is simple
                runTypeAddWin.FakeButtonAccept.Clicked += new EventHandler(on_run_type_add_accepted);
        }
        
        private void on_run_intervallic_type_add_activate (object o, EventArgs args) {
-               Log.WriteLine("Add intervallic new run type");
+               LogB.Information("Add intervallic new run type");
                        
                runTypeAddWin = RunTypeAddWindow.Show(app1, false); //is intervallic
                runTypeAddWin.FakeButtonAccept.Clicked += new EventHandler(on_run_type_add_accepted);
        }
        
        private void on_run_type_add_accepted (object o, EventArgs args) {
-               Log.WriteLine("ACCEPTED Add new run type");
+               LogB.Information("ACCEPTED Add new run type");
                if(runTypeAddWin.InsertedSimple) {
                        createComboSelectRuns(false); //this will update also the selectRunsString
 
@@ -5500,11 +5494,11 @@ Console.WriteLine("X");
        //reactiontime has no types
 
        private void on_pulse_type_add_activate (object o, EventArgs args) {
-               Log.WriteLine("Add new pulse type");
+               LogB.Information("Add new pulse type");
        }
        
        private void on_pulse_type_add_accepted (object o, EventArgs args) {
-               Log.WriteLine("ACCEPTED Add new pulse type");
+               LogB.Information("ACCEPTED Add new pulse type");
        }
 
        /* ---------------------------------------------------------
@@ -5580,7 +5574,7 @@ Console.WriteLine("X");
        
        private void on_repair_selected_jump_rj_clicked (object o, EventArgs args) {
                //notebooks_change(1); see "notebooks_change sqlite problem"
-               Log.WriteLine("Repair selected subjump");
+               LogB.Information("Repair selected subjump");
                //1.- check that there's a line selected
                //2.- check that this line is a jump and not a person (check also if it's not a individual 
RJ, the pass the parent RJ)
                if (myTreeViewJumpsRj.EventSelectedID > 0) {
@@ -5594,7 +5588,7 @@ Console.WriteLine("X");
        }
        
        private void on_repair_selected_jump_rj_accepted (object o, EventArgs args) {
-               Log.WriteLine("Repair selected reactive jump accepted");
+               LogB.Information("Repair selected reactive jump accepted");
                
                treeview_jumps_rj_storeReset();
                fillTreeView_jumps_rj(UtilGtk.ComboGetActive(combo_result_jumps_rj));
@@ -5606,7 +5600,7 @@ Console.WriteLine("X");
        
        private void on_repair_selected_run_interval_clicked (object o, EventArgs args) {
                //notebooks_change(3); see "notebooks_change sqlite problem"
-               Log.WriteLine("Repair selected subrun");
+               LogB.Information("Repair selected subrun");
                //1.- check that there's a line selected
                //2.- check that this line is a run and not a person 
                //(check also if it's not a individual run interval, then pass the parent run interval)
@@ -5621,7 +5615,7 @@ Console.WriteLine("X");
        }
        
        private void on_repair_selected_run_interval_accepted (object o, EventArgs args) {
-               Log.WriteLine("repair selected run interval accepted");
+               LogB.Information("repair selected run interval accepted");
                
                treeview_runs_interval_storeReset();
                fillTreeView_runs_interval(UtilGtk.ComboGetActive(combo_result_runs_interval));
@@ -5633,7 +5627,7 @@ Console.WriteLine("X");
 
        private void on_repair_selected_pulse_clicked (object o, EventArgs args) {
                //notebooks_change(5); see "notebooks_change sqlite problem"
-               Log.WriteLine("Repair selected pulse");
+               LogB.Information("Repair selected pulse");
                //1.- check that there's a line selected
                //2.- check that this line is a pulse and not a person 
                //(check also if it's not a individual pulse, then pass the parent pulse)
@@ -5648,7 +5642,7 @@ Console.WriteLine("X");
        }
        
        private void on_repair_selected_pulse_accepted (object o, EventArgs args) {
-               Log.WriteLine("repair selected pulse accepted");
+               LogB.Information("repair selected pulse accepted");
                
                treeview_pulses_storeReset();
                fillTreeView_pulses(UtilGtk.ComboGetActive(combo_pulses));
@@ -5656,7 +5650,7 @@ Console.WriteLine("X");
 
        private void on_repair_selected_multi_chronopic_clicked (object o, EventArgs args) {
                //notebooks_change(6); see "notebooks_change sqlite problem"
-               Log.WriteLine("Repair selected multichronopic");
+               LogB.Information("Repair selected multichronopic");
        }
        
        /* ---------------------------------------------------------
@@ -5822,7 +5816,7 @@ Console.WriteLine("X");
                                Catalog.GetString("Newer versions will be on this site:") +"\n" + 
                                "<i>http://www.chronojump.org/multimedia.html</i>");
                                */
-               Log.WriteLine("Opening manual at: " + Path.GetFullPath(Util.GetManualDir())); 
+               LogB.Information("Opening manual at: " + Path.GetFullPath(Util.GetManualDir())); 
                try {
                        System.Diagnostics.Process.Start(Path.GetFullPath(Util.GetManualDir())); 
                } catch {
@@ -6054,7 +6048,7 @@ Console.WriteLine("X");
        }
    
        private void sensitiveGuiEventDone () {
-               Log.Write(" sensitiveGuiEventDone start ");
+               LogB.Information(" sensitiveGuiEventDone start ");
 
                session_menuitem.Sensitive = true;
                menuitem_mode.Sensitive = true;
@@ -6089,20 +6083,20 @@ Console.WriteLine("X");
                if(! currentEventExecute.Cancel) {
                        switch (currentEventType.Type) {
                                case EventType.Types.REACTIONTIME:
-                                       Log.WriteLine("sensitiveGuiEventDone reaction time");
+                                       LogB.Information("sensitiveGuiEventDone reaction time");
                                        break;
                                case EventType.Types.PULSE:
-                                       Log.WriteLine("sensitiveGuiEventDone pulse");
+                                       LogB.Information("sensitiveGuiEventDone pulse");
                                        break;
                                case EventType.Types.MULTICHRONOPIC:
-                                       Log.WriteLine("sensitiveGuiEventDone multichronopic");
+                                       LogB.Information("sensitiveGuiEventDone multichronopic");
                                        break;
                                default:
-                                       Log.WriteLine("sensitiveGuiEventDone default");
+                                       LogB.Information("sensitiveGuiEventDone default");
                                        break;
                        }
                }
-               Log.Write(" sensitiveGuiEventDone end ");
+               LogB.Information(" sensitiveGuiEventDone end ");
        }
        
        /*
@@ -6253,7 +6247,7 @@ Console.WriteLine("X");
                        success = true;
                } 
                if (!success)
-                       Log.WriteLine(string.Format("Error in showHideActionEventButtons, type: {0}", type));
+                       LogB.Error(string.Format("Error in showHideActionEventButtons, type: {0}", type));
 
                button_video_play_this_test.Sensitive = recordedVideo;
        }
@@ -6274,11 +6268,11 @@ Console.WriteLine("X");
 
        private void crashing (object o, EventArgs args) {
                string [] myString = new String [3];
-               Console.WriteLine(myString[5]);
+               LogB.Error(myString[5]);
        }
 
        private void on_menuitem_server_activate (object o, EventArgs args) {
-               Log.WriteLine("SERVER");
+               LogB.Information("SERVER");
        }
 
 
diff --git a/src/gui/chronopic.cs b/src/gui/chronopic.cs
index 68048e3..fceb073 100644
--- a/src/gui/chronopic.cs
+++ b/src/gui/chronopic.cs
@@ -243,7 +243,6 @@ public class ChronopicWindow
 
                ChronopicWindowBox.chronopic_window.Show();
                ChronopicWindowBox.chronopic_window.Present();
-Log.WriteLine("bbb");
        
                return ChronopicWindowBox;
        }
@@ -329,7 +328,7 @@ Log.WriteLine("bbb");
                                //https://bugzilla.xamarin.com/show_bug.cgi?id=15514
                                if(! isWindows) {
                                        if(! File.Exists(myPort)) {
-                                               Log.WriteLine("port does not exists: " + myPort);
+                                               LogB.Error("port does not exists:", myPort);
                                                errorFound = true;
                                        }
                                }
@@ -338,10 +337,10 @@ Log.WriteLine("bbb");
                                        //try {
                                        ok = myCP.Read_platform(out myPS);
                                        //} catch { 
-                                       //      Log.WriteLine("catch at 1"); 
+                                       //      LogB.DebugLine("catch at 1"); 
                                        //}
                                        if(!ok) {
-                                               Log.WriteLine("false at 1");
+                                               LogB.Error("false at 1");
                                                errorFound = true;
                                        }
                                }
@@ -527,7 +526,7 @@ Log.WriteLine("bbb");
                //make active menuitem chronopic, and this
                //will raise other things
 //             menuitem_chronopic.Active = true;
-               Log.WriteLine("CP AT START from gui/chronopic.cs");
+               LogB.Information("CP AT START from gui/chronopic.cs");
        }
 
 
@@ -536,7 +535,7 @@ Log.WriteLine("bbb");
                if(needUpdateChronopicWin || ! thread.IsAlive) {
                        fakeConnectionButton.Click();
                        pulseEnd();
-                       Log.Write("dying");
+                       LogB.Information("dying");
                        return false;
                }
                //need to do this, if not it crashes because chronopicConnectionWin gets died by thread ending
@@ -545,7 +544,7 @@ Log.WriteLine("bbb");
                progressbar.Pulse();
                
                Thread.Sleep (50);
-               Log.Write(thread.ThreadState.ToString());
+               LogB.Debug(thread.ThreadState.ToString());
                return true;
        }
 
@@ -556,12 +555,12 @@ Log.WriteLine("bbb");
        }
                        
        private void updateChronopicWin(bool state, string message) {
-               Log.WriteLine("updateChronopicWin-1");
+               LogB.Information("updateChronopicWin-1");
 
                //need to do this, if not it crashes because chronopicConnectionWin gets died by thread ending
                //chronopicConnectionWin = ChronopicConnection.Show();
 
-               Log.WriteLine("updateChronopicWin-2");
+               LogB.Information("updateChronopicWin-2");
                if(state) {
                        //chronopicConnectionWin.Connected(message);
                        sensitivityConnected(message);
@@ -575,7 +574,7 @@ Log.WriteLine("bbb");
        }
        
        private void sensitivityConnected(string message) {
-               Log.WriteLine("CONNECTED!!");
+               LogB.Information("CONNECTED!!");
                label_title.Text = message;
                label_title.UseMarkup = true;
                button_cancel.Sensitive = false;
@@ -583,7 +582,7 @@ Log.WriteLine("bbb");
        }
 
        private void sensitivityDisconnected(string message) {
-               Log.WriteLine("DISCONNECTED!!");
+               LogB.Information("DISCONNECTED!!");
                label_title.Text = message;
                button_cancel.Sensitive = false;
                check_multitest_show.Sensitive = false;
@@ -597,29 +596,29 @@ Log.WriteLine("bbb");
        //private Chronopic chronopicInit (out Chronopic myCp, out SerialPort mySp, Chronopic.Plataforma 
myPS, string myPort, out string returnString, out bool success) 
        private void chronopicInit (out Chronopic myCp, out SerialPort mySp, Chronopic.Plataforma myPS, 
string myPort, out string returnString, out bool success) 
        {
-               Log.WriteLine ( Catalog.GetString ("starting connection with chronopic") );
+               LogB.Information ( Catalog.GetString ("starting connection with chronopic") );
 
                success = true;
                
-               Log.WriteLine("chronopicInit-1");               
-               Log.WriteLine(string.Format("chronopic port: {0}", myPort));
+               LogB.Information("chronopicInit-1");            
+               LogB.Information(string.Format("chronopic port: {0}", myPort));
                mySp = new SerialPort(myPort);
                try {
                        mySp.Open();
-                       Log.WriteLine("chronopicInit-2");               
+                       LogB.Information("chronopicInit-2");            
                        //-- Create chronopic object, for accessing chronopic
                        myCp = new Chronopic(mySp);
                        
-                       Log.WriteLine("chronopicInit-2.1");             
+                       LogB.Information("chronopicInit-2.1");          
                        myCp.Flush();
                        
                        //if myCp has been cancelled
                        if(myCp.AbortFlush) {
-                               Log.WriteLine("chronopicInit-2.2 cancelled");
+                               LogB.Information("chronopicInit-2.2 cancelled");
                                success = false;
                                myCp = new Chronopic(); //fake constructor
                        } else {
-                               Log.WriteLine("chronopicInit-3");               
+                               LogB.Information("chronopicInit-3");            
                                //on windows, this check make a crash 
                                //i think the problem is: as we don't really know the Timeout on Windows 
(.NET) and this variable is not defined on chronopic.cs
                                //the Read_platform comes too much soon (when cp is not totally created), and 
this makes crash
@@ -627,21 +626,21 @@ Log.WriteLine("bbb");
                                //-- Obtener el estado inicial de la plataforma
 
                                bool ok=false;
-                               Log.WriteLine("chronopicInit-4");               
+                               LogB.Information("chronopicInit-4");            
                                do {
-                                       Log.WriteLine("chronopicInit-5");               
+                                       LogB.Information("chronopicInit-5");            
                                        ok=myCp.Read_platform(out myPS);
-                                       Log.WriteLine("chronopicInit-6");               
+                                       LogB.Information("chronopicInit-6");            
                                } while(! ok && ! cancelledByUser);
-                               Log.WriteLine("chronopicInit-7");               
+                               LogB.Information("chronopicInit-7");            
                                if (!ok) {
                                        //-- Si hay error terminar
-                                       Log.WriteLine(string.Format("Error: {0}", myCp.Error));
+                                       LogB.Error(string.Format("Error: {0}", myCp.Error));
                                        success = false;
                                }
                        }
                } catch {
-                       Log.WriteLine("chronopicInit-2.a catched");
+                       LogB.Error("chronopicInit-2.a catched");
                        success = false;
                        myCp = new Chronopic(); //fake constructor
                }
@@ -709,12 +708,12 @@ Log.WriteLine("bbb");
        }
        
        private void on_button_help_clicked (object o, EventArgs args) {
-               Log.WriteLine("HELP");
+               LogB.Information("HELP");
                new HelpPorts();
        }
        
        public void SerialPortsClose() {
-               Console.WriteLine("Closing sp");
+               LogB.Information("Closing sp");
                sp.Close();
        }
 
@@ -904,7 +903,7 @@ Log.WriteLine("bbb");
                }
                
 
-               Log.WriteLine(string.Format("wait_chronopic_start {0}", message));
+               LogB.Information(string.Format("wait_chronopic_start {0}", message));
                        
                if(success) {
                        Util.PlaySound(Constants.SoundTypes.GOOD, volumeOn);
@@ -917,7 +916,7 @@ Log.WriteLine("bbb");
                }
 
                foreach(ChronopicPortData a in cpd)
-                       Log.WriteLine(a.Num + ", " + a.Port + ", " + a.Connected);
+                       LogB.Information(a.Num + ", " + a.Port + ", " + a.Connected);
 
                needUpdateChronopicWin = true;
        }
@@ -928,7 +927,7 @@ Log.WriteLine("bbb");
 
 
        private void on_button_cancel_clicked (object o, EventArgs args) {
-               Log.WriteLine("cancelled-----");
+               LogB.Information("cancelled-----");
                //fakeButtonCancelled.Click(); //just to show message of crashing on windows exiting
                
                button_cancel.Sensitive = false;
@@ -939,13 +938,13 @@ Log.WriteLine("bbb");
                //kill the chronopicInit function that is waiting event 
                //thread.Abort();
                //http://stackoverflow.com/questions/2853072/thread-does-not-abort-on-application-closing
-               //Log.Write(thread.ThreadState.ToString());
+               //LogB.Debug(thread.ThreadState.ToString());
                //thread.IsBackground = true;
                
                //try to solve windows problems when a chronopic detection was cancelled
-               //Log.Write(thread.ThreadState.ToString());
+               //LogB.Debug(thread.ThreadState.ToString());
                //thread.Join(1000);
-               //Log.Write(thread.ThreadState.ToString());
+               //LogB.Debug(thread.ThreadState.ToString());
 
                
                updateChronopicWinValuesState= false; //disconnected
@@ -958,7 +957,7 @@ Log.WriteLine("bbb");
                if(connecting)
                        button_cancel.Click();
 
-               Log.WriteLine("CLOSE");
+               LogB.Information("CLOSE");
                fakeWindowDone.Click();
                ChronopicWindowBox.chronopic_window.Hide();
        }
@@ -978,7 +977,7 @@ Log.WriteLine("bbb");
        public bool IsConnected(int numCP) {
                //int count = 1;
                //foreach(ChronopicPortData a in cpd) 
-               //      Log.WriteLine(a.Num + ", " + a.Port + ", " + a.Connected);
+               //      LogB.InformationLine(a.Num + ", " + a.Port + ", " + a.Connected);
                return ((ChronopicPortData) cpd[numCP]).Connected;
        }
 
diff --git a/src/gui/convertWeight.cs b/src/gui/convertWeight.cs
index f13b555..2694540 100644
--- a/src/gui/convertWeight.cs
+++ b/src/gui/convertWeight.cs
@@ -166,7 +166,7 @@ public class ConvertWeightWindow
                if (store.GetIter (out iter, new TreePath(args.Path))) 
                {
                        bool val = (bool) store.GetValue (iter, columnThis);
-                       Log.WriteLine (string.Format("toggled {0} with value {1}", args.Path, !val));
+                       LogB.Information (string.Format("toggled {0} with value {1}", args.Path, !val));
 
                        if(args.Path == "0") {
                                if (store.GetIterFirst(out iter)) {
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index a095b6a..ad4357e 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -348,7 +348,7 @@ public partial class ChronoJumpWindow
        }
        
        private void on_encoder_capture_options_closed(object o, EventArgs args) {
-               Log.WriteLine("closed");
+               LogB.Information("Encoder capture options closed");
                //update the bars graph because main variable maybe has changed
        }
        
@@ -476,14 +476,14 @@ public partial class ChronoJumpWindow
                        if(notebook_encoder_capture.CurrentPage == 1)
                                notebook_encoder_capture.PrevPage();
 
-                       Log.WriteLine("AAAAAAAAAAAAAAA");
+                       LogB.Debug("AAAAAAAAAAAAAAA");
                        
                        encoderProcessFinish = false;
                        encoderThreadStart(encoderActions.CAPTURE);
                        
                        //entry_encoder_signal_comment.Text = "";
 
-                       Log.WriteLine("ZZZZZZZZZZZZZZZ");
+                       LogB.Debug("ZZZZZZZZZZZZZZZ");
                //}
        }
        
@@ -584,10 +584,10 @@ public partial class ChronoJumpWindow
        }
 
        protected void on_encoder_1RM_win_row_delete (object o, EventArgs args) {
-               Log.WriteLine("row delete at encoder 1RM");
+               LogB.Information("row delete at encoder 1RM");
 
                int uniqueID = genericWin.TreeviewSelectedUniqueID;
-               Log.WriteLine(uniqueID.ToString());
+               LogB.Information(uniqueID.ToString());
 
                Sqlite.Delete(false, Constants.Encoder1RMTable, Convert.ToInt32(uniqueID));
                
@@ -772,7 +772,7 @@ public partial class ChronoJumpWindow
                int count = 0;
                foreach(EncoderSQL es in data) {
                        checkboxes[count++] = es.status;
-                       //Log.WriteLine(checkboxes[count-1]);
+                       //LogB.Information(checkboxes[count-1]);
                        dataPrint.Add(es.ToStringArray(count,true,false,true,true));
                }
        
@@ -883,13 +883,13 @@ public partial class ChronoJumpWindow
        }
        
        protected void on_encoder_show_curves_row_edit (object o, EventArgs args) {
-               Log.WriteLine("row edit at show curves");
-               Log.WriteLine(genericWin.TreeviewSelectedUniqueID.ToString());
+               LogB.Information("row edit at show curves");
+               LogB.Information(genericWin.TreeviewSelectedUniqueID.ToString());
                genericWin.ShowEditRow(true);
        }
 
        protected void on_encoder_show_curves_row_edit_apply (object o, EventArgs args) {
-               Log.WriteLine("row edit apply at show curves");
+               LogB.Information("row edit apply at show curves");
 
                int curveID = genericWin.TreeviewSelectedUniqueID;
                EncoderSQL eSQL = (EncoderSQL) SqliteEncoder.Select(
@@ -909,7 +909,7 @@ public partial class ChronoJumpWindow
                }
 
                //if changed person, proceed
-               Log.WriteLine("new person: " + genericWin.GetComboSelected);
+               LogB.Information("new person: " + genericWin.GetComboSelected);
                int newPersonID = Util.FetchID(genericWin.GetComboSelected);
                if(newPersonID != currentPerson.UniqueID) {
                        EncoderSQL eSQLChangedPerson = eSQL.ChangePerson(genericWin.GetComboSelected);
@@ -932,7 +932,7 @@ public partial class ChronoJumpWindow
        }
        
        protected void on_encoder_show_curves_row_delete (object o, EventArgs args) {
-               Log.WriteLine("row delete at show curves");
+               LogB.Information("row delete at show curves");
 
                int uniqueID = genericWin.TreeviewSelectedUniqueID;
 
@@ -942,7 +942,7 @@ public partial class ChronoJumpWindow
        }
 
        void delete_encoder_curve(int uniqueID) {
-               Log.WriteLine(uniqueID.ToString());
+               LogB.Information(uniqueID.ToString());
 
                EncoderSQL eSQL = (EncoderSQL) SqliteEncoder.Select(false, uniqueID, 0, 0, -1, "", 
EncoderSQL.Eccons.ALL, false, true)[0];
                //remove the file
@@ -1070,7 +1070,7 @@ public partial class ChronoJumpWindow
 
                genericWin.HideAndNull();
                
-               Log.WriteLine("done");
+               LogB.Information("done");
        }
        
        void encoder_analyze_data_compare_intersession () 
@@ -1169,7 +1169,7 @@ public partial class ChronoJumpWindow
 
                genericWin.HideAndNull();
                
-               Log.WriteLine("done");
+               LogB.Information("done");
        }
        
 
@@ -1287,13 +1287,13 @@ public partial class ChronoJumpWindow
        }
        
        protected void on_encoder_load_signal_row_edit (object o, EventArgs args) {
-               Log.WriteLine("row edit at load signal");
-               Log.WriteLine(genericWin.TreeviewSelectedUniqueID.ToString());
+               LogB.Information("row edit at load signal");
+               LogB.Information(genericWin.TreeviewSelectedUniqueID.ToString());
                genericWin.ShowEditRow(true);
        }
        
        protected void on_encoder_load_signal_row_edit_apply (object o, EventArgs args) {
-               Log.WriteLine("row edit apply at load signal");
+               LogB.Information("row edit apply at load signal");
                        
                int curveID = genericWin.TreeviewSelectedUniqueID;
                EncoderSQL eSQL = (EncoderSQL) SqliteEncoder.Select(false, curveID, 0, 0, -1, "", 
EncoderSQL.Eccons.ALL, false, true)[0];
@@ -1310,7 +1310,7 @@ public partial class ChronoJumpWindow
                }
 
                //if changed person, proceed
-               Log.WriteLine("new person: " + genericWin.GetComboSelected);
+               LogB.Information("new person: " + genericWin.GetComboSelected);
                int newPersonID = Util.FetchID(genericWin.GetComboSelected);
                if(newPersonID != currentPerson.UniqueID) {
                        EncoderSQL eSQLChangedPerson = eSQL.ChangePerson(genericWin.GetComboSelected);
@@ -1332,10 +1332,10 @@ public partial class ChronoJumpWindow
        }
        
        protected void on_encoder_load_signal_row_delete (object o, EventArgs args) {
-               Log.WriteLine("row delete at load signal");
+               LogB.Information("row delete at load signal");
 
                int signalID = genericWin.TreeviewSelectedUniqueID;
-               Log.WriteLine(signalID.ToString());
+               LogB.Information(signalID.ToString());
 
                //if it's current signal use the delete signal from the gui interface that updates gui
                if(signalID == Convert.ToInt32(encoderSignalUniqueID))
@@ -1477,12 +1477,12 @@ public partial class ChronoJumpWindow
                                exportFileName = Util.AddPngIfNeeded(exportFileName);
                        try {
                                if (File.Exists(exportFileName)) {
-                                       Log.WriteLine(string.Format(
+                                       LogB.Information(string.Format(
                                                                "File {0} exists with attributes {1}, created 
at {2}", 
                                                                exportFileName, 
                                                                File.GetAttributes(exportFileName), 
                                                                File.GetCreationTime(exportFileName)));
-                                       Log.WriteLine("Overwrite...");
+                                       LogB.Information("Overwrite...");
                                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
                                                                "Are you sure you want to overwrite file: "), 
"", 
                                                        exportFileName);
@@ -1518,7 +1518,7 @@ public partial class ChronoJumpWindow
                        }
                }
                else {
-                       Log.WriteLine("cancelled");
+                       LogB.Information("cancelled");
                        //report does not currently send the appBar reference
                        new DialogMessage(Constants.MessageTypes.INFO, Catalog.GetString("Cancelled."));
                        fc.Hide ();
@@ -1733,7 +1733,7 @@ public partial class ChronoJumpWindow
                        //desc = Util.RemoveTildeAndColonAndDot(entry_encoder_curve_comment.Text.ToString());
                        desc = "";
 
-                       Log.WriteLine(curveStart + "->" + duration);
+                       LogB.Information(curveStart + "->" + duration);
                
                        int curveIDMax;
                        int countCurveIDs = Sqlite.Count(Constants.EncoderTable, false);
@@ -1924,18 +1924,18 @@ public partial class ChronoJumpWindow
        }
        
        private bool runEncoderCaptureCsharpCheckPort(string port) {
-               Log.WriteLine("00a 1");
+               LogB.Information("00a 1");
                SerialPort sp = new SerialPort(port);
-               Log.WriteLine("00b 1");
+               LogB.Information("00b 1");
                sp.BaudRate = 115200;
-               Log.WriteLine("00c 1");
+               LogB.Information("00c 1");
                try {
                        sp.Open();
                        sp.Close();
                } catch {
                        return false;
                }
-               Log.WriteLine("00d 1");
+               LogB.Information("00d 1");
                return true;
        }
                
@@ -1948,13 +1948,13 @@ public partial class ChronoJumpWindow
                int height=encoder_capture_signal_drawingarea.Allocation.Height;
                double realHeight = 1000 * 2 * 
encoderCaptureOptionsWin.spin_encoder_capture_curves_height_range.Value;
                
-               Log.Write(" 00a 2 ");
+               LogB.Debug(" 00a 2 ");
                SerialPort sp = new SerialPort(port);
-               Log.Write(" 00b 2 ");
+               LogB.Debug(" 00b 2 ");
                sp.BaudRate = 115200;
-               Log.Write(" 00c 2 ");
+               LogB.Debug(" 00c 2 ");
                sp.Open();
-               Log.Write(" 00d 2 ");
+               LogB.Debug(" 00d 2 ");
                        
                encoderCaptureCountdown = time;
                //int recordingTime = es.Ep.Time * 1000;
@@ -2021,7 +2021,7 @@ public partial class ChronoJumpWindow
                        try {
                                byteReadedRaw = sp.ReadByte();
                        } catch {
-                               Log.WriteLine("Maybe encoder cable is disconnected");
+                               LogB.Error("Maybe encoder cable is disconnected");
                                encoderProcessCancel = true;
                                break;
                        }
@@ -2052,7 +2052,7 @@ public partial class ChronoJumpWindow
                                                (ecca.curvesAccepted == 0 && consecutiveZeros >= (2* 
consecutiveZerosMax)) )
                                {
                                        encoderProcessFinish = true;
-                                       Log.WriteLine("SHOULD FINISH");
+                                       LogB.Information("SHOULD FINISH");
                                }
 
 
@@ -2148,9 +2148,9 @@ public partial class ChronoJumpWindow
                        }
                } while (i < (recordingTime -1) && ! encoderProcessCancel && ! encoderProcessFinish);
 
-               Log.Write(" 00e ");
+               LogB.Debug(" 00e ");
                sp.Close();
-               Log.Write(" 00f ");
+               LogB.Debug(" 00f ");
 
                if(encoderProcessCancel)
                        return false;
@@ -2339,7 +2339,7 @@ public partial class ChronoJumpWindow
                        ArrayList eeArray = SqliteEncoder.SelectEncoderExercises(false, -1, false);
                        EncoderExercise ex = new EncoderExercise();
                                                
-                       Log.WriteLine("AT ANALYZE");
+                       LogB.Information("AT ANALYZE");
 
                        int iteratingPerson = -1;
                        int iteratingSession = -1;
@@ -2352,13 +2352,13 @@ public partial class ChronoJumpWindow
                                        if(eSQL.exerciseID == eeSearch.uniqueID)
                                                ex = eeSearch;
 
-                               Log.Write(" AT ANALYZE 1.1 ");
+                               LogB.Debug(" AT ANALYZE 1.1 ");
                                //massBody change if we are comparing different persons or sessions
                                if(eSQL.personID != iteratingPerson || eSQL.sessionID != iteratingSession) {
                                        iteratingMassBody = SqlitePersonSession.SelectAttribute(
                                                        true, eSQL.personID, eSQL.sessionID, 
Constants.Weight);
                                }
-                               Log.Write(" AT ANALYZE 1.2 ");
+                               LogB.Debug(" AT ANALYZE 1.2 ");
 
                                //seriesName
                                string seriesName = "";
@@ -2374,7 +2374,7 @@ public partial class ChronoJumpWindow
                                                encoderDataCompareTranslation) == "Between sessions") 
                                {
                                        foreach(string str in encoderCompareIntersession) {
-                                               Log.WriteLine(str);
+                                               LogB.Information(str);
                                                if(Util.FetchID(str) == eSQL.sessionID)
                                                        seriesName = Util.FetchName(str);
                                        }
@@ -2414,11 +2414,11 @@ public partial class ChronoJumpWindow
                                countSeries ++;
                        }
                        writer.Flush();
-                       Log.Write(" closing writer ");
+                       LogB.Debug(" closing writer ");
                        writer.Close();
-                       Log.Write(" disposing writer ");
+                       LogB.Debug(" disposing writer ");
                        ((IDisposable)writer).Dispose();
-                       Log.Write(" AT ANALYZE 2 ");
+                       LogB.Debug(" AT ANALYZE 2 ");
                        Sqlite.Close(); 
 
                } else {        //current signal
@@ -3299,9 +3299,9 @@ public partial class ChronoJumpWindow
                string name = Util.RemoveTildeAndColonAndDot(genericWin.EntrySelected);
 
                if(adding)
-                       Log.WriteLine("Trying to insert: " + name);
+                       LogB.Information("Trying to insert: " + name);
                else
-                       Log.WriteLine("Trying to edit: " + name);
+                       LogB.Information("Trying to edit: " + name);
 
                if(name == "")
                        genericWin.SetLabelError(Catalog.GetString("Error: Missing name of exercise."));
@@ -3339,7 +3339,7 @@ public partial class ChronoJumpWindow
                        combo_encoder_exercise.Active = UtilGtk.ComboMakeActive(combo_encoder_exercise, name);
 
                        genericWin.HideAndNull();
-                       Log.WriteLine("done");
+                       LogB.Information("done");
                }
        }
        
@@ -3595,7 +3595,7 @@ public partial class ChronoJumpWindow
                int last = encoderCapturePointsCaptured;
                int toDraw = encoderCapturePointsCaptured - encoderCapturePointsPainted;
 
-               //Log.WriteLine("last - toDraw:" + last + " - " + toDraw);      
+               //LogB.Information("last - toDraw:" + last + " - " + toDraw);   
 
                //fixes crash at the end
                if(toDraw == 0)
@@ -3625,7 +3625,7 @@ public partial class ChronoJumpWindow
 
                if(refreshAreaOnly) {
                        /*                      
-                                               Log.WriteLine("pp X-TD-W: " + 
+                                               LogB.Information("pp X-TD-W: " + 
                                                paintPoints[0].X.ToString() + " - " + 
                                                paintPoints[toDraw-1].X.ToString() + " - " + 
                                                (paintPoints[toDraw-1].X-paintPoints[0].X).ToString());
@@ -3650,7 +3650,7 @@ public partial class ChronoJumpWindow
                                        //encoder_capture_signal_drawingarea.Allocation.Height
                                        maxY-minY
                                        );
-                       Log.WriteLine("minY - maxY " + minY + " - " + maxY);
+                       LogB.Information("minY - maxY " + minY + " - " + maxY);
                } else
                        encoder_capture_signal_drawingarea.QueueDraw();                         // -- refresh
 
@@ -3664,7 +3664,7 @@ public partial class ChronoJumpWindow
        
        private void updateEncoderCaptureGraphRCalcPre(bool plotCurvesBars) 
        {
-               Log.WriteLine(" PERFORMING CALCULATIONS A ");
+               LogB.Information(" PERFORMING CALCULATIONS A ");
        
                //check if this helps to show bars on slow computers
                if(! updatingEncoderCaptureGraphRCalc) {
@@ -3684,21 +3684,21 @@ public partial class ChronoJumpWindow
                        return;
                
                updatingEncoderCaptureGraphRCalc = true;
-               Log.WriteLine(" PERFORMING CALCULATIONS B ");
+               LogB.Information(" PERFORMING CALCULATIONS B ");
 
                EncoderCaptureCurve ecc = (EncoderCaptureCurve) ecca.ecc[ecca.curvesDone];
-               Log.Write("\n" + ecc.DirectionAsString() + " " + ecc.startFrame.ToString() + " " + 
ecc.endFrame.ToString());
+               LogB.Information("\n" + ecc.DirectionAsString() + " " + ecc.startFrame.ToString() + " " + 
ecc.endFrame.ToString());
                
                string eccon = findEccon(true);
                        
-               Log.Write(" uECGRC0 ");
-               Log.Write("eccon: + " + eccon + "; endFrame: " + ecc.endFrame + "; startFrame: " + 
ecc.startFrame + 
+               LogB.Debug(" uECGRC0 ");
+               LogB.Information("eccon: + " + eccon + "; endFrame: " + ecc.endFrame + "; startFrame: " + 
ecc.startFrame + 
                                "; operation: " + (ecc.endFrame - ecc.startFrame).ToString() );
                
                if( ( ( eccon == "c" && ecc.up ) || eccon != "c" ) &&
                                (ecc.endFrame - ecc.startFrame) > 0 ) 
                {
-                       Log.Write(" uECGRC1 ");
+                       LogB.Debug(" uECGRC1 ");
                        
                        double height = 0;
 
@@ -3712,14 +3712,14 @@ public partial class ChronoJumpWindow
                        //check height in a fast way first to discard curves soon
                        //only process curves with height >= min_height
                        height = Math.Abs(height / 10); //mm -> cm
-                       Log.Write(" height: " + height.ToString());
+                       LogB.Information(" height: " + height.ToString());
                        if(height < (int) encoderCaptureOptionsWin.spin_encoder_capture_min_height.Value) {
                                ecca.curvesDone ++;
                                return; 
                        }
 
                        
-                       Log.Write(" uECGRC2 calling rdotnet ");
+                       LogB.Information(" uECGRC2 calling rdotnet ");
 
                        NumericVector curveToR = rengine.CreateNumericVector(curve);
                        rengine.SetSymbol("curveToR", curveToR);
@@ -3733,7 +3733,7 @@ public partial class ChronoJumpWindow
                                return;
                        }
 
-                       Log.Write(" uECGRC3 ");
+                       LogB.Debug(" uECGRC3 ");
                        //reduce curve by speed, the same way as graph.R
                        rengine.Evaluate("b=extrema(speedCut$y)");
 
@@ -3746,7 +3746,7 @@ public partial class ChronoJumpWindow
                                rengine.Evaluate("speedT2 <- max(which(speedCut$y == min(speedCut$y)))");
                        }
                        
-                       Log.Write(" uECGRC4 ");
+                       LogB.Debug(" uECGRC4 ");
                        int speedT1 = rengine.GetSymbol("speedT1").AsInteger().First();
                        int speedT2 = rengine.GetSymbol("speedT2").AsInteger().First();
 
@@ -3759,7 +3759,7 @@ public partial class ChronoJumpWindow
                        //left adjust
                        //find the b$cross at left of max speed
 
-                       Log.Write(" uECGRC5 ");
+                       LogB.Debug(" uECGRC5 ");
 
                        int x_ini = 0;  
                        if(bcrossLen == 0)
@@ -3774,7 +3774,7 @@ public partial class ChronoJumpWindow
                                                x_ini = bcross[i];      //left adjust
                                }
                        }
-                       Log.Write(" uECGRC6 ");
+                       LogB.Debug(" uECGRC6 ");
 
                        //rengine.Evaluate("curveToRcumsum = cumsum(curveToR)");
 
@@ -3799,16 +3799,16 @@ public partial class ChronoJumpWindow
                                }
                        }
                        
-                       Log.Write(" uECGRC7 ");
+                       LogB.Debug(" uECGRC7 ");
 
-                       Log.WriteLine("reducedCurveBySpeed (start, end)");
-                       Log.WriteLine((ecc.startFrame + x_ini).ToString());
-                       Log.WriteLine((ecc.startFrame + x_end).ToString());
+                       LogB.Information("reducedCurveBySpeed (start, end)");
+                       LogB.Information((ecc.startFrame + x_ini).ToString());
+                       LogB.Information((ecc.startFrame + x_end).ToString());
 
                        //TODO: this is to get info about previous TODO bug
                        if(ecc.startFrame + x_end <= ecc.startFrame + x_ini)
                                for(int i=x_end; i < x_ini; i ++)
-                                       Log.Write(curveToR[i] + ","); //TODO: provar aixo!!                   
          
+                                       LogB.Information(curveToR[i] + ","); //TODO: provar aixo!!            
                  
 
                        //create a curveToR with only reduced curve
                        NumericVector curveToRreduced = rengine.CreateNumericVector(new double[x_end - 
x_ini]);
@@ -3851,11 +3851,11 @@ public partial class ChronoJumpWindow
                        rengine.Evaluate("g <- 9.81");
                        if(ecc.up && preferences.encoderPropulsive) {
                                //check if propulsive phase ends
-                               Log.WriteLine("accel$y");
+                               LogB.Information("accel$y");
                                //rengine.Evaluate("print(accel$y)");
                                rengine.Evaluate("propulsiveStuffAtRight <- length(which(accel$y <= -g))"); 
                                int propulsiveStuffAtRight = 
rengine.GetSymbol("propulsiveStuffAtRight").AsInteger().First();
-                               Log.WriteLine(string.Format("propulsiveStuffAtRight: {0}", 
propulsiveStuffAtRight));
+                               LogB.Information(string.Format("propulsiveStuffAtRight: {0}", 
propulsiveStuffAtRight));
                                if(propulsiveStuffAtRight > 0) {
                                        rengine.Evaluate("propulsiveEnd <- min(which(accel$y <= -g))");
                                        int propulsiveEnd = 
rengine.GetSymbol("propulsiveEnd").AsInteger().First();
@@ -3926,7 +3926,7 @@ public partial class ChronoJumpWindow
                        }
 
 
-                       Log.WriteLine(string.Format(
+                       LogB.Information(string.Format(
                                                "height: {0}\nmeanSpeed: {1}\n, maxSpeed: {2}\n, maxSpeedT: 
{3}\n" + 
                                                "meanPower: {4}\npeakPower: {5}\npeakPowerT: {6}", 
                                                height, meanSpeed, maxSpeed, speedT1, meanPower, peakPower, 
peakPowerT));
@@ -3951,7 +3951,7 @@ public partial class ChronoJumpWindow
        void plotCurvesGraphDoPlot(string mainVariable, double mainVariableHigher, double mainVariableLower, 
                        ArrayList data4Variables, bool capturing) 
        {
-               //Log.WriteLine("at plotCurvesGraphDoPlot");
+               //LogB.Information("at plotCurvesGraphDoPlot");
                UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea, 
encoder_capture_curves_bars_pixmap);
 
                int graphWidth=encoder_capture_curves_bars_drawingarea.Allocation.Width;
@@ -4251,7 +4251,7 @@ public partial class ChronoJumpWindow
                /* in some mono installations, configure_event is not called, but expose_event yes. 
                 * Do here the initialization
                 */
-               //Log.WriteLine("EXPOSE");
+               //LogB.Information("EXPOSE");
                
                Gdk.Rectangle allocation = encoder_capture_curves_bars_drawingarea.Allocation;
                if(encoder_capture_curves_bars_pixmap == null || encoder_capture_curves_sizeChanged || 
@@ -4309,7 +4309,7 @@ public partial class ChronoJumpWindow
                /* in some mono installations, configure_event is not called, but expose_event yes. 
                 * Do here the initialization
                 */
-               //Log.WriteLine("EXPOSE");
+               //LogB.Information("EXPOSE");
                
                Gdk.Rectangle allocation = encoder_capture_signal_drawingarea.Allocation;
                if(encoder_capture_signal_pixmap == null || encoder_capture_signal_sizeChanged || 
@@ -4348,7 +4348,7 @@ public partial class ChronoJumpWindow
                                        
                if(action == encoderActions.CAPTURE || action == encoderActions.CAPTURE_IM) {
                        //encoder_pulsebar_capture.Text = Catalog.GetString("Please, wait.");
-                       Log.WriteLine("CCCCCCCCCCCCCCC");
+                       LogB.Information("CCCCCCCCCCCCCCC");
                        if( runEncoderCaptureCsharpCheckPort(chronopicWin.GetEncoderPort()) ) {
                                if(action == encoderActions.CAPTURE) {
                                        if(RInitialized == Constants.Status.UNSTARTED)
@@ -4401,7 +4401,7 @@ public partial class ChronoJumpWindow
                                hbox_encoder_capture_wait.Visible = false;
                                hbox_encoder_capture_doing.Visible = true;
 
-                               Log.WriteLine("DDDDDDDDDDDDDDD");
+                               LogB.Information("DDDDDDDDDDDDDDD");
                                encoderButtonsSensitive(encoderSensEnum.PROCESSINGCAPTURE);
                                encoderThread.Start(); 
                        } else {
@@ -4516,7 +4516,7 @@ public partial class ChronoJumpWindow
        {
                if(! encoderThread.IsAlive || encoderProcessCancel) {
                        finishPulsebar(encoderActions.CURVES);
-                       Log.Write("dying");
+                       LogB.Information("dying");
                        return false;
                }
                if(capturingCsharp == encoderCaptureProcess.CAPTURING) {
@@ -4538,7 +4538,7 @@ public partial class ChronoJumpWindow
                        } else
                                updateEncoderCaptureGraph(true, true, true); //graphSignal, calcCurves, 
plotCurvesBars
                        
-                       Log.Write(" Cap:" + encoderThread.ThreadState.ToString());
+                       LogB.Debug(" Cap:" + encoderThread.ThreadState.ToString());
                } else if(capturingCsharp == encoderCaptureProcess.STOPPING) {
                        //stop video            
                        encoderStopVideoRecord();
@@ -4546,7 +4546,7 @@ public partial class ChronoJumpWindow
                } else {        //STOPPED       
                        //do curves, capturingCsharp has ended
                        updatePulsebar(encoderActions.CURVES); //activity on pulsebar
-                       Log.Write(" Cur:" + encoderThread.ThreadState.ToString());
+                       LogB.Debug(" Cur:" + encoderThread.ThreadState.ToString());
                }
                        
                Thread.Sleep (25);
@@ -4558,14 +4558,14 @@ public partial class ChronoJumpWindow
        {
                if(! encoderThread.IsAlive || encoderProcessCancel) {
                        finishPulsebar(encoderActions.CAPTURE_IM);
-                       Log.Write("dying");
+                       LogB.Information("dying");
                        return false;
                }
                updatePulsebar(encoderActions.CAPTURE_IM); //activity on pulsebar
                updateEncoderCaptureGraph(true, false, false); //graphSignal, not calcCurves, not 
plotCurvesBars
 
                Thread.Sleep (25);
-               Log.Write(" CapIM:" + encoderThread.ThreadState.ToString());
+               LogB.Debug(" CapIM:" + encoderThread.ThreadState.ToString());
                return true;
        }
        
@@ -4578,12 +4578,12 @@ public partial class ChronoJumpWindow
                        }
 
                        finishPulsebar(encoderActions.CURVES);
-                       Log.Write("dying");
+                       LogB.Information("dying");
                        return false;
                }
                updatePulsebar(encoderActions.CURVES); //activity on pulsebar
                Thread.Sleep (50);
-               Log.Write(" Cur:" + encoderThread.ThreadState.ToString());
+               LogB.Debug(" Cur:" + encoderThread.ThreadState.ToString());
                return true;
        }
        
@@ -4595,12 +4595,12 @@ public partial class ChronoJumpWindow
                        }
 
                        finishPulsebar(encoderActions.LOAD);
-                       Log.Write("dying");
+                       LogB.Debug("dying");
                        return false;
                }
                updatePulsebar(encoderActions.LOAD); //activity on pulsebar
                Thread.Sleep (50);
-               Log.Write(" L:" + encoderThread.ThreadState.ToString());
+               LogB.Debug(" L:" + encoderThread.ThreadState.ToString());
                return true;
        }
        
@@ -4612,12 +4612,12 @@ public partial class ChronoJumpWindow
                        }
 
                        finishPulsebar(encoderActions.ANALYZE);
-                       Log.Write("dying");
+                       LogB.Debug("dying");
                        return false;
                }
                updatePulsebar(encoderActions.ANALYZE); //activity on pulsebar
                Thread.Sleep (50);
-               Log.Write(" A:" + encoderThread.ThreadState.ToString());
+               LogB.Debug(" A:" + encoderThread.ThreadState.ToString());
                return true;
        }
        
@@ -4700,7 +4700,7 @@ public partial class ChronoJumpWindow
                                action == encoderActions.CURVES || 
                                action == encoderActions.LOAD )
                {
-                       Log.WriteLine("ffffffinishPulsebarrrrr");
+                       LogB.Information("ffffffinishPulsebarrrrr");
                
                        //save video will be later at encoderSaveSignalOrCurve, because there 
encoderSignalUniqueID will be known
                        
@@ -4784,7 +4784,7 @@ public partial class ChronoJumpWindow
                                 * because with a value of -1 there will be problems in 
                                 * SqliteEncoder.Select(false, Convert.ToInt32(encoderSignalUniqueID), ...)
                                 */
-                               Log.Write(" encoderSignalUniqueID:" + encoderSignalUniqueID);
+                               LogB.Information(" encoderSignalUniqueID:" + encoderSignalUniqueID);
                                if(encoderSignalUniqueID != "-1")
                                {
 
@@ -4829,7 +4829,7 @@ public partial class ChronoJumpWindow
                        {
                                string imResultText = Util.ChangeDecimalSeparator(
                                                
Util.ReadFile(UtilEncoder.GetEncoderSpecialDataTempFileName(), true) );
-                               Log.WriteLine("imResultText = |" + imResultText + "|");
+                               LogB.Information("imResultText = |" + imResultText + "|");
 
                                if(imResultText == "NA" || imResultText == "")
                                        encoder_configuration_win.Button_encoder_capture_inertial_do_ended 
(0, "Error capturing. Maybe need more oscillations.");
@@ -4909,9 +4909,9 @@ public partial class ChronoJumpWindow
                ArrayList linkedCurves = SqliteEncoder.SelectSignalCurve(false, 
                                Convert.ToInt32(encoderSignalUniqueID), //signal
                                -1, -1, -1);                            //curve, msStart,msEnd
-               //Log.WriteLine("SAVED CURVES FOUND");
+               //LogB.Information("SAVED CURVES FOUND");
                //foreach(EncoderSignalCurve esc in linkedCurves)
-               //      Log.WriteLine(esc.ToString());
+               //      LogB.Information(esc.ToString());
 
                int curveCount = 0;
                double curveStart = 0;
@@ -4933,7 +4933,7 @@ public partial class ChronoJumpWindow
                        foreach(EncoderSignalCurve esc in linkedCurves) {
                                if(curveStart <= esc.msCentral && curveEnd >= esc.msCentral)
                                {
-                                       Log.WriteLine(curve.Start + " is saved");
+                                       LogB.Information(curve.Start + " is saved");
                                        encoderCaptureSelectBySavedCurves(esc.msCentral, true);
                                        break;
                                }
@@ -4947,7 +4947,7 @@ public partial class ChronoJumpWindow
        
        /* video stuff */
        private void encoderStartVideoRecord() {
-               Log.WriteLine("Starting video");
+               LogB.Information("Starting video");
                checkbutton_video_encoder.Sensitive = false;
                if(preferences.videoOn) {
                        capturer.ClickRec();
@@ -4957,7 +4957,7 @@ public partial class ChronoJumpWindow
        }
 
        private void encoderStopVideoRecord() {
-               Log.WriteLine("Stopping video");
+               LogB.Information("Stopping video");
                checkbutton_video_encoder.Sensitive = true;
                if(preferences.videoOn) {
                        label_video_feedback_encoder.Text = "";
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index 79dc434..749f47b 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -58,10 +58,10 @@ public partial class ChronoJumpWindow
                int curvesCount = 0;
                using (StringReader reader = new StringReader (contents)) {
                        line = reader.ReadLine ();      //headers
-                       Log.WriteLine(line);
+                       LogB.Information(line);
                        do {
                                line = reader.ReadLine ();
-                               Log.WriteLine(line);
+                               LogB.Information(line);
                                if (line == null)
                                        break;
 
@@ -170,7 +170,7 @@ public partial class ChronoJumpWindow
        //rowNum starts at zero
        void saveOrDeleteCurveFromCaptureTreeView(int rowNum, EncoderCurve curve, bool save) 
        {
-               Log.WriteLine("saving? " + save.ToString() + "; rownum:" + rowNum.ToString());
+               LogB.Information("saving? " + save.ToString() + "; rownum:" + rowNum.ToString());
                if(save)
                        encoderSaveSignalOrCurve("curve", rowNum +1);
                else {
@@ -385,7 +385,7 @@ public partial class ChronoJumpWindow
                                iterOk = encoderCaptureListStore.IterNext (ref iter);
                                EncoderCurve curve2 = (EncoderCurve) encoderCaptureListStore.GetValue (iter, 
0);
 
-                               Log.WriteLine("msCentral, start, end" + msCentral.ToString() + " " + 
curve.Start + " " + 
+                               LogB.Information("msCentral, start, end" + msCentral.ToString() + " " + 
curve.Start + " " + 
                                                (Convert.ToDouble(curve2.Start) + 
Convert.ToDouble(curve2.Duration)).ToString());
 
                                if(Convert.ToDouble(curve.Start) <= msCentral && 
@@ -469,10 +469,10 @@ public partial class ChronoJumpWindow
                int curvesCount = 0;
                using (StringReader reader = new StringReader (contents)) {
                        line = reader.ReadLine ();      //headers
-                       Log.WriteLine(line);
+                       LogB.Information(line);
                        do {
                                line = reader.ReadLine ();
-                               Log.WriteLine(line);
+                               LogB.Information(line);
                                if (line == null)
                                        break;
 
@@ -619,10 +619,10 @@ public partial class ChronoJumpWindow
                int curvesCount = 0;
                using (StringReader reader = new StringReader (contents)) {
                        line = reader.ReadLine ();      //headers
-                       Log.WriteLine(line);
+                       LogB.Information(line);
                        do {
                                line = reader.ReadLine ();
-                               Log.WriteLine(line);
+                               LogB.Information(line);
                                if (line == null)
                                        break;
 
diff --git a/src/gui/error.cs b/src/gui/error.cs
index ccd08a4..1dec79c 100644
--- a/src/gui/error.cs
+++ b/src/gui/error.cs
@@ -41,7 +41,7 @@ public class ErrorWindow
        
        public ErrorWindow (string text1)
        {
-               Console.WriteLine("At error window2");
+               LogB.Information("At error window2");
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "error_window", 
"chronojump");
                gladeXML.Autoconnect(this);
@@ -55,7 +55,7 @@ public class ErrorWindow
 
        static public ErrorWindow Show (string text1)
        {
-               Console.WriteLine("At error window");
+               LogB.Information("At error window");
                if (ErrorWindowBox == null) {
                        ErrorWindowBox = new ErrorWindow(text1);
                }
@@ -103,7 +103,7 @@ public class ErrorWindow
        }
        private void on_button_open_docs_folder_clicked (object o, EventArgs args)
        {
-               Log.WriteLine("Opening docs at: " + Path.GetFullPath(Util.GetManualDir())); 
+               LogB.Information("Opening docs at: " + Path.GetFullPath(Util.GetManualDir())); 
                try {
                        System.Diagnostics.Process.Start(Path.GetFullPath(Util.GetManualDir())); 
                } catch {
diff --git a/src/gui/event.cs b/src/gui/event.cs
index 81edd7c..5bfc49d 100644
--- a/src/gui/event.cs
+++ b/src/gui/event.cs
@@ -310,7 +310,7 @@ public class EditEventWindow
 
        private void on_button_video_watch_clicked (object o, EventArgs args) {
                if(File.Exists(videoFileName)) { 
-                       Log.WriteLine("Exists and clicked " + videoFileName);
+                       LogB.Information("Exists and clicked " + videoFileName);
 
                        PlayerBin player = new PlayerBin();
                        player.Open(videoFileName);
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index c5335ff..3462b42 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -640,7 +640,7 @@ public partial class ChronoJumpWindow
                if(eventGraphConfigureWin == null)
                        eventGraphConfigureWin = EventGraphConfigureWindow.Show(false);
 
-Log.WriteLine("Preparing reactive A");
+               LogB.Debug("Preparing reactive A");
 
                //search MAX
                double maxValue = 0;
@@ -1609,7 +1609,7 @@ Log.WriteLine("Preparing reactive A");
                if(time < 0)
                        time = 0;
 
-               //Console.WriteLine("   timestamp {0}, ancho {1}, x {2}, timeold{3}, xOld{4}", 
+               //LogB.Information("   timestamp {0}, ancho {1}, x {2}, timeold{3}, xOld{4}", 
                //timestamp, ancho, Util.TrimDecimals(x,1), timeOld, Util.TrimDecimals(xOld,1));
 
                return ( ancho * ( (timeOld + time) / timeTotal) ) -event_execute_rightMargin;
@@ -1646,7 +1646,7 @@ Log.WriteLine("Preparing reactive A");
                        if(timeTotal4 > timeTotal)
                                timeTotal = timeTotal4;
                }
-               Console.WriteLine("total time: {0}", timeTotal);
+               LogB.Information("total time: {0}" + timeTotal);
 
 
                /*
@@ -1672,22 +1672,22 @@ Log.WriteLine("Preparing reactive A");
                //if(maxValue - minValue <= 0) 
                //      return;
 
-               Console.Write(" paint0 ");
+               LogB.Debug(" paint0 ");
                
                if(event_execute_eventType == Constants.RunAnalysisName)
                        paintMultiChronopicRunAPhotocell (ancho, cp1StartedIn, cp1InStr, cp1OutStr, yCp1Out 
+10, yCp1Out);
                else
                        paintMultiChronopicDefault (ancho, cp1StartedIn, cp1InStr, cp1OutStr, timeTotal, 
yCp1Out +10, yCp1Out);
 
-               Console.Write(" paint1 ");
+               LogB.Debug(" paint1 ");
                paintMultiChronopicDefault (ancho, cp2StartedIn, cp2InStr, cp2OutStr, timeTotal, yCp2Out +10, 
yCp2Out);
-               Console.Write(" paint2 ");
+               LogB.Debug(" paint2 ");
                paintMultiChronopicDefault (ancho, cp3StartedIn, cp3InStr, cp3OutStr, timeTotal, yCp3Out +10, 
yCp3Out);
-               Console.Write(" paint3 ");
+               LogB.Debug(" paint3 ");
                paintMultiChronopicDefault (ancho, cp4StartedIn, cp4InStr, cp4OutStr, timeTotal, yCp4Out +10, 
yCp4Out);
-               Console.Write(" paint4 ");
+               LogB.Debug(" paint4 ");
 
-               Console.Write(" paint done ");
+               LogB.Information(" paint done ");
        }
 
        private void paintMultiChronopicDefault (int ancho, bool cpStartedIn, string cpInStr, string 
cpOutStr, double timeTotal, int h1, int h2) 
@@ -1730,7 +1730,7 @@ Log.WriteLine("Preparing reactive A");
                double xOld = 0;
                bool lastCpIsStart = true;
 
-               Console.WriteLine("\n(A) cpInStr:*{0}*, cpOutStr:*{1}*", cpInStr, cpOutStr);
+               LogB.Information("(A) cpInStr:*" + cpInStr + "*, cpOutStr:*" + cpOutStr + "*");
 
                for(int i=0; i < ticks; i++) { 
                        if(cpStart.Length > i) {
@@ -1765,14 +1765,14 @@ Log.WriteLine("Preparing reactive A");
                   following code allows to paint line also on other chronopics
                   in order to show all updated four cps after any cp change
                   */
-               Console.WriteLine("(C)");
+               LogB.Debug("(C)");
                if(timeOld < timeTotal) { //this cp didn't received last event
                        if(lastCpIsStart)
                                event_execute_pixmap.DrawLine(penStartDiscont, Convert.ToInt32(xOld), 
heightStart, Convert.ToInt32(ancho-event_execute_rightMargin), heightStart);
                        else
                                event_execute_pixmap.DrawLine(penEndDiscont, Convert.ToInt32(xOld), 
heightEnd, Convert.ToInt32(ancho-event_execute_rightMargin), heightEnd);
                }
-               Console.WriteLine("(D)");
+               LogB.Debug("(D)");
        }
 
        private void paintMultiChronopicRunAPhotocell (int ancho, bool cpStartedIn, string cpInStr, string 
cpOutStr, int h1, int h2) 
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index 9a1f8af..9415ea8 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -392,7 +392,7 @@ public class GenericWindow
                        try {
                                markSelected(myText);
                        } catch {
-                               Log.WriteLine("Do later!!");
+                               LogB.Warning("Do later!!");
                        }
                }
        }
@@ -463,12 +463,12 @@ public class GenericWindow
 
                nonSensitiveRows = myNonSensitiveRows;
        
-Log.WriteLine("aaaaaaaaaaaaaaaa1");    
+               LogB.Debug("aaaaaaaaaaaaaaaa1");        
                foreach (string [] line in data) {
                        store.AppendValues (line);
                        //Log.WriteLine(Util.StringArrayToString(line,"\n"));
                }
-Log.WriteLine("aaaaaaaaaaaaaaaa2");    
+               LogB.Debug("aaaaaaaaaaaaaaaa2");        
 
                genericWinContextMenu = contextMenu;
                this.activateRowAcceptsWindow = activateRowAcceptsWindow;
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index 542e27d..37b99aa 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -116,7 +116,7 @@ public class EditJumpWindow : EditEventWindow
                else
                        label_weight_units.Text = "Kg";
 
-               Log.WriteLine(string.Format("-------------{0}", personWeight));
+               LogB.Information(string.Format("-------------{0}", personWeight));
        }
 
        protected override string [] findTypes(Event myEvent) {
@@ -429,7 +429,7 @@ public class EditJumpWindow : EditEventWindow
                        double newPersonWeight = SqlitePersonSession.SelectAttribute(false, personID, 
mySessionID, Constants.Weight); 
                        //jumpPercentWeightForNewPerson = jumpWeightInKg * 100 / newPersonWeight; 
                        jumpPercentWeightForNewPerson = Util.WeightFromKgToPercent(jumpWeightInKg, 
newPersonWeight); 
-                       Log.WriteLine(string.Format("oldPW: {0}, jWinKg {1}, newPW{2}, jWin%NewP{3}",
+                       LogB.Information(string.Format("oldPW: {0}, jWinKg {1}, newPW{2}, jWin%NewP{3}",
                                        oldPersonWeight, jumpWeightInKg, newPersonWeight, 
jumpPercentWeightForNewPerson));
                }
 
@@ -632,7 +632,7 @@ public class RepairJumpRjWindow
        
        static public RepairJumpRjWindow Show (Gtk.Window parent, JumpRj myJump, int pDN)
        {
-               //Log.WriteLine(myJump);
+               //LogB.Information(myJump);
                if (RepairJumpRjWindowBox == null) {
                        RepairJumpRjWindowBox = new RepairJumpRjWindow (parent, myJump, pDN);
                }
@@ -1567,7 +1567,7 @@ public class JumpsMoreWindow : EventMoreWindow
                
                //delete from typesTranslated
                string row = Util.FindOnArray(':',0, -1, selectedEventName, typesTranslated);
-               Log.WriteLine("row " + row);
+               LogB.Information("row " + row);
                typesTranslated = Util.DeleteString(typesTranslated, row);
        }
 
diff --git a/src/gui/jumpType.cs b/src/gui/jumpType.cs
index 0569680..7a4e27a 100644
--- a/src/gui/jumpType.cs
+++ b/src/gui/jumpType.cs
@@ -136,7 +136,7 @@ public class JumpTypeAddWindow
                        
                        string myString = string.Format(Catalog.GetString("Jump type: '{0}' exists. Please, 
use another name"), Util.RemoveTildeAndColonAndDot(entry_name.Text) );
                        
-                       Log.WriteLine (myString);
+                       LogB.Information (myString);
                        ErrorWindow.Show(myString);
                } else {
                        string myJump = "";
@@ -185,7 +185,7 @@ public class JumpTypeAddWindow
                                InsertedSimple = false;
                        }
                        
-                       Log.WriteLine(string.Format("Inserted: {0}", myJump));
+                       LogB.Information(string.Format("Inserted: {0}", myJump));
                
                        fakeButtonAccept.Click();
 
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 607bd3e..f897ce0 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -434,7 +434,7 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
                        try {
                                markSelected(myText);
                        } catch {
-                               Log.WriteLine("Do later!!");
+                               LogB.Warning("Do later!!");
                        }
                }
        }
@@ -473,14 +473,14 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
        }
 
        protected void ItemToggled(object o, ToggledArgs args) {
-               Log.WriteLine("Toggled");
+               LogB.Information("Toggled");
 
                int column = 0;
                TreeIter iter;
                if (store.GetIter (out iter, new TreePath(args.Path))) 
                {
                        bool val = (bool) store.GetValue (iter, column);
-                       Log.WriteLine (string.Format("toggled {0} with value {1}", args.Path, !val));
+                       LogB.Information (string.Format("toggled {0} with value {1}", args.Path, !val));
 
                        store.SetValue (iter, column, !val);
                
@@ -632,9 +632,9 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
                        currentPerson = personAddModifyWin.CurrentPerson;
                        currentRow ++;
                                
-                       Log.WriteLine("To sleep in order AddMoidfyWin gets closed, in order to open again");
+                       LogB.Information("To sleep in order AddMoidfyWin gets closed, in order to open 
again");
                        System.Threading.Thread.Sleep (100);
-                       Log.WriteLine("done");
+                       LogB.Information("done");
                        processRow();
                }
        }
@@ -645,9 +645,9 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
                {
                        currentRow ++;
                        
-                       Log.WriteLine("To sleep in order AddModifyWin gets closed, in order to open again");
+                       LogB.Information("To sleep in order AddModifyWin gets closed, in order to open 
again");
                        System.Threading.Thread.Sleep (100);
-                       Log.WriteLine("done");
+                       LogB.Information("done");
                        inserted --;
                        processRow();
                }
@@ -1391,7 +1391,7 @@ public class PersonAddModifyWindow
                if (o == null)
                        return;
 
-               //Log.WriteLine("changed");
+               //LogB.Information("changed");
                try {
                        int sportID = Convert.ToInt32(Util.FindOnArray(':', 2, 0, 
UtilGtk.ComboGetActive(combo_sports), sports));
                        sport = SqliteSport.Select(sportID);
@@ -1408,7 +1408,7 @@ public class PersonAddModifyWindow
                                        label_speciallity.Hide();
                                        combo_speciallities.Hide();
                                }
-                               catch { Log.WriteLine("do later"); }
+                               catch { LogB.Warning("do later"); }
                        } else if(Catalog.GetString(sport.Name) == Catalog.GetString(Constants.SportNone)) {
                                //if sport is none, level should be sedentary and unsensitive
                                try { 
@@ -1423,7 +1423,7 @@ public class PersonAddModifyWindow
                                        label_speciallity.Hide();
                                        combo_speciallities.Hide();
                                }
-                               catch { Log.WriteLine("do later"); }
+                               catch { LogB.Warning("do later"); }
                        } else {
                                //sport is not undefined and not none
 
@@ -1445,7 +1445,7 @@ public class PersonAddModifyWindow
                                        label_speciallity.Show();
                                        combo_speciallities.Show();
                                } else {
-                                       Log.Write("hide");
+                                       LogB.Information("hide");
                                        combo_speciallities.Active = 
UtilGtk.ComboMakeActive(speciallitiesTranslated,
                                                        Catalog.GetString(Constants.SpeciallityUndefined));
                                        label_speciallity.Hide();
@@ -1453,21 +1453,21 @@ public class PersonAddModifyWindow
                                }
                        }
                } catch { 
-                       //Log.WriteLine("do later");
+                       //LogB.Warning("do later");
                }
 
                on_entries_required_changed(new object(), new EventArgs());
-               Log.WriteLine(sport.ToString());
+               LogB.Information(sport.ToString());
        }
        
        private void on_combo_speciallities_changed(object o, EventArgs args) {
-               Log.WriteLine("changed speciallities");
+               LogB.Information("changed speciallities");
                on_entries_required_changed(new object(), new EventArgs());
        }
 
        private void on_combo_levels_changed(object o, EventArgs args) {
                //string myText = UtilGtk.ComboGetActive(combo_sports);
-               Log.WriteLine("changed levels");
+               LogB.Information("changed levels");
                on_entries_required_changed(new object(), new EventArgs());
                //level = UtilGtk.ComboGetActive(combo_levels);
                                
@@ -1480,7 +1480,7 @@ public class PersonAddModifyWindow
        }
        
        private void on_combo_continents_changed(object o, EventArgs args) {
-               //Console.WriteLine("Changed");
+               //LogB.Information("Changed");
 
                if(UtilGtk.ComboGetActive(combo_continents) == 
Catalog.GetString(Constants.ContinentUndefined)) {
                        countries [0] = Constants.CountryUndefinedID + ":" + 
@@ -1521,7 +1521,7 @@ public class PersonAddModifyWindow
        
        void on_button_sport_add_clicked (object o, EventArgs args)
        {
-               Log.WriteLine("sport add clicked");
+               LogB.Information("sport add clicked");
                genericWin = GenericWindow.Show(Catalog.GetString("Add new sport to database"), 
Constants.GenericWindowShow.ENTRY);
                genericWin.Button_accept.Clicked += new EventHandler(on_sport_add_accepted);
        }
@@ -1980,7 +1980,7 @@ public class PersonAddMultipleWindow {
                                                if(headersActive && row == 0)
                                                        continue;
                                                
-                                               Log.Write(":" + str);
+                                               LogB.Debug(":" + str);
 
                                                if(col == 0) {
                                                        if(name1Column)
@@ -2021,7 +2021,7 @@ public class PersonAddMultipleWindow {
                                        }
                                        
                                        row ++;
-                                       Log.Write("\n");
+                                       LogB.Debug("\n");
                                }
                        }
 
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 43e51c0..2ead9bd 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -380,7 +380,7 @@ public class PreferencesWindow {
        void on_button_logs_folder_open_clicked (object o, EventArgs args)
        {
                string dir = UtilAll.GetLogsDir();
-               Log.WriteLine(dir);
+               LogB.Information(dir);
                
                if( ! new System.IO.DirectoryInfo(dir).Exists) {
                        try {
@@ -447,20 +447,20 @@ public class PreferencesWindow {
                                bool exists = false;
                                if(check_backup_encoder_tests.Active || check_backup_multimedia.Active) {
                                        if(Directory.Exists(fileCopy)) {
-                                               Log.WriteLine(string.Format("Directory {0} exists, created at 
{1}", 
+                                               LogB.Information(string.Format("Directory {0} exists, created 
at {1}", 
                                                                        fileCopy, 
Directory.GetCreationTime(fileCopy)));
                                                exists = true;
                                        }
                                } else {
                                        if (File.Exists(fileCopy)) {
-                                               Log.WriteLine(string.Format("File {0} exists with attributes 
{1}, created at {2}", 
+                                               LogB.Information(string.Format("File {0} exists with 
attributes {1}, created at {2}", 
                                                                        fileCopy, 
File.GetAttributes(fileCopy), File.GetCreationTime(fileCopy)));
                                                exists = true;
                                        }
                                }
 
                                if(exists) {
-                                       Log.WriteLine("Overwrite...");
+                                       LogB.Information("Overwrite...");
                                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are 
you sure you want to overwrite: "), "", fileCopy);
                                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_overwrite_file_accepted);
                                } else {
@@ -527,7 +527,7 @@ public class PreferencesWindow {
        private bool PulseGTK ()
        {
                if ( ! thread.IsAlive ) {
-                       Log.Write("dying");
+                       LogB.Information("dying");
                        
                        endPulse();
 
@@ -536,7 +536,7 @@ public class PreferencesWindow {
        
                pulsebar.Pulse();
                Thread.Sleep (50);
-               //Log.Write(thread.ThreadState.ToString());
+               //LogB.Debug(thread.ThreadState.ToString());
                return true;
        }
 
diff --git a/src/gui/queryServer.cs b/src/gui/queryServer.cs
index 77085d8..9deb656 100644
--- a/src/gui/queryServer.cs
+++ b/src/gui/queryServer.cs
@@ -537,7 +537,7 @@ public class QueryServerWindow
                if (o == null)
                        return;
 
-               //Log.WriteLine("changed");
+               //LogB.Information("changed");
                try {
                        int sportID = Convert.ToInt32(Util.FindOnArray(':', 2, 0, 
UtilGtk.ComboGetActive(combo_sports), sports));
                        sport = SqliteSport.Select(sportID);
@@ -554,7 +554,7 @@ public class QueryServerWindow
                                        label_speciallity.Hide();
                                        combo_speciallities.Hide();
                                }
-                               catch { Log.WriteLine("do later"); }
+                               catch { LogB.Warning("do later"); }
                        } else if(Catalog.GetString(sport.Name) == Catalog.GetString(Constants.SportNone)) {
                                //if sport is none, level should be sedentary and unsensitive
                                try { 
@@ -569,7 +569,7 @@ public class QueryServerWindow
                                        label_speciallity.Hide();
                                        combo_speciallities.Hide();
                                }
-                               catch { Log.WriteLine("do later"); }
+                               catch { LogB.Warning("do later"); }
                        } else {
                                //sport is not undefined and not none
 
@@ -591,7 +591,7 @@ public class QueryServerWindow
                                        label_speciallity.Show();
                                        combo_speciallities.Show();
                                } else {
-                                       Log.Write("hide");
+                                       LogB.Information("hide");
                                        combo_speciallities.Active = 
UtilGtk.ComboMakeActive(speciallitiesTranslated,
                                                        Catalog.GetString(Constants.SpeciallityUndefined));
                                        label_speciallity.Hide();
@@ -599,11 +599,11 @@ public class QueryServerWindow
                                }
                        }
                } catch { 
-                       //Log.WriteLine("do later");
+                       //LogB.Warning("do later");
                }
 
                on_entries_required_changed(new object(), new EventArgs());
-               Log.WriteLine(sport.ToString());
+               LogB.Information(sport.ToString());
        }
        
        private void on_combo_other_changed(object o, EventArgs args) {
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 9cdb628..31ef4d2 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -622,7 +622,7 @@ public class RepairRunIntervalWindow
        
        static public RepairRunIntervalWindow Show (Gtk.Window parent, RunInterval myRun, int pDN)
        {
-               //Log.WriteLine(myRun);
+               //LogB.Information(myRun);
                if (RepairRunIntervalWindowBox == null) {
                        RepairRunIntervalWindowBox = new RepairRunIntervalWindow (parent, myRun, pDN);
                }
@@ -1315,7 +1315,7 @@ public class RunsMoreWindow : EventMoreWindow
                
                //delete from typesTranslated
                string row = Util.FindOnArray(':',0, -1, selectedEventName, typesTranslated);
-               Log.WriteLine("row " + row);
+               LogB.Information("row " + row);
                typesTranslated = Util.DeleteString(typesTranslated, row);
        }
 
diff --git a/src/gui/runType.cs b/src/gui/runType.cs
index 4c73d20..5b62ce1 100644
--- a/src/gui/runType.cs
+++ b/src/gui/runType.cs
@@ -163,7 +163,7 @@ public class RunTypeAddWindow
        
        void on_button_accept_clicked (object o, EventArgs args)
        {
-               //Console.WriteLine(getEntriesString());
+               //ConsoleB.Information(getEntriesString());
 
                //check if this run type exists, and check it's name is not AllRunsName
                bool runTypeExists = Sqlite.Exists (false, Constants.RunTypeTable, 
Util.RemoveTildeAndColonAndDot(entry_name.Text));
@@ -174,7 +174,7 @@ public class RunTypeAddWindow
                if(runTypeExists) {
                        string myString = string.Format(Catalog.GetString("Run type: '{0}' exists. Please, 
use another name"), 
                                        Util.RemoveTildeAndColonAndDot(entry_name.Text) );
-                       Log.WriteLine (myString);
+                       LogB.Information (myString);
                        ErrorWindow.Show(myString);
                } else {
                        RunType type = new RunType();
@@ -218,7 +218,7 @@ public class RunTypeAddWindow
                                InsertedSimple = false;
                        }
                        
-                       //Log.WriteLine(string.Format("Inserted: {0}", type));
+                       //LogB.Information(string.Format("Inserted: {0}", type));
                        
                        fakeButtonAccept.Click();
                
diff --git a/src/gui/session.cs b/src/gui/session.cs
index 6b06dce..3734619 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -138,7 +138,7 @@ public class SessionAddEditWindow {
        }
        
        void showSportStuffWithLoadedData() {
-               Log.Write(string.Format("{0}-{1}-{2}", currentSession.PersonsSportID, 
currentSession.PersonsSpeciallityID, currentSession.PersonsPractice));
+               LogB.Information(string.Format("{0}-{1}-{2}", currentSession.PersonsSportID, 
currentSession.PersonsSpeciallityID, currentSession.PersonsPractice));
 
                if(currentSession.PersonsSportID != Constants.SportUndefinedID) { 
                        radiobutton_same_sport.Active = true;
@@ -354,7 +354,7 @@ public class SessionAddEditWindow {
                if (o == null)
                        return;
 
-               //Log.WriteLine("changed");
+               //LogB.Information("changed");
                try {
                        //sport = new Sport(UtilGtk.ComboGetActive(combo_sports));
                        int sportID = Convert.ToInt32(Util.FindOnArray(':', 2, 0, 
UtilGtk.ComboGetActive(combo_sports), sports));
@@ -371,7 +371,7 @@ public class SessionAddEditWindow {
                                                        Catalog.GetString(Constants.SpeciallityUndefined));
                                        speciallity_row_show(false);
                                }
-                               catch { Log.WriteLine("do later"); }
+                               catch { LogB.Warning("do later"); }
                        } else if(Catalog.GetString(sport.Name) == Catalog.GetString(Constants.SportNone)) {
                                //if sport is none, level should be sedentary and unsensitive
                                try { 
@@ -385,7 +385,7 @@ public class SessionAddEditWindow {
 
                                        speciallity_row_show(false);
                                }
-                               catch { Log.WriteLine("do later"); }
+                               catch { LogB.Warning("do later"); }
                        } else {
                                //sport is not undefined and not none
 
@@ -406,29 +406,29 @@ public class SessionAddEditWindow {
                                        createComboSpeciallities(sport.UniqueID);
                                        speciallity_row_show(true);
                                } else {
-                                       Log.Write("hide");
+                                       LogB.Information("hide");
                                        combo_speciallities.Active = 
UtilGtk.ComboMakeActive(speciallitiesTranslated, 
                                                        Catalog.GetString(Constants.SpeciallityUndefined));
                                        speciallity_row_show(false);
                                }
                        }
                } catch { 
-                       //Log.WriteLine("do later");
+                       //LogB.Warning("do later");
                }
 
-               Log.WriteLine("at on_combo_sports_changed " + sport.ToString());
+               LogB.Information("at on_combo_sports_changed " + sport.ToString());
                //labelUpdate();
        }
 
        private void on_combo_speciallities_changed(object o, EventArgs args) {
-               Log.WriteLine("changed speciallities");
+               LogB.Information("changed speciallities");
                labelUpdate();
                showHideButtonAccept();
        }
 
        private void on_combo_levels_changed(object o, EventArgs args) {
                //string myText = UtilGtk.ComboGetActive(combo_sports);
-               Log.WriteLine("changed levels");
+               LogB.Information("changed levels");
                //level = UtilGtk.ComboGetActive(combo_levels);
                                
                //if it's sedentary, put sport to none
@@ -489,7 +489,7 @@ public class SessionAddEditWindow {
                        label_persons_data.Text= sportString + speciallityString + levelString;
                        label_persons_data.UseMarkup = true;
                } catch {
-                       Log.WriteLine("Do later");
+                       LogB.Warning("Do later");
                }
        }
 
@@ -520,7 +520,7 @@ public class SessionAddEditWindow {
 
        void on_button_sport_add_clicked (object o, EventArgs args)
        {
-               Log.WriteLine("sport add clicked");
+               LogB.Information("sport add clicked");
                genericWin = GenericWindow.Show(Catalog.GetString("Add new sport to database"), 
Constants.GenericWindowShow.ENTRY);
                genericWin.Button_accept.Clicked += new EventHandler(on_sport_add_accepted);
        }
@@ -743,11 +743,11 @@ public class SessionLoadWindow {
        }
        
        void on_checkbutton_show_data_jump_run_toggled (object o, EventArgs args) {
-               Log.WriteLine("jump run " + checkbutton_show_data_jump_run.Active.ToString());
+               LogB.Information("jump run " + checkbutton_show_data_jump_run.Active.ToString());
                recreateTreeView();     
        }
        void on_checkbutton_show_data_encoder_toggled (object o, EventArgs args) {
-               Log.WriteLine("encoder " + checkbutton_show_data_encoder.Active.ToString());
+               LogB.Information("encoder " + checkbutton_show_data_encoder.Active.ToString());
                recreateTreeView();     
        }
 
@@ -1133,7 +1133,7 @@ public class SessionSelectStatsWindow {
                                        (string) myTreeview.Model.GetValue (myIter, 1) + ":" +  //name
                                        (string) myTreeview.Model.GetValue (myIter, 3)          //date 
(forget place)
                                        );
-                               Log.WriteLine(arrayOfSelectedSessions[count].ToString());
+                               LogB.Information(arrayOfSelectedSessions[count].ToString());
                        }
                } 
        }
diff --git a/src/gui/splash.cs b/src/gui/splash.cs
index 2e17082..6b78d32 100644
--- a/src/gui/splash.cs
+++ b/src/gui/splash.cs
@@ -134,13 +134,13 @@ public class SplashWindow
                //it seem on some machines (MacOSX) splash_window maybe is Destroyed previously because 
on_delete_event it's called
                //Destroy here if it has not been destroyed
                if(SplashWindowBox.splash_window == null)
-                       Log.WriteLine("splash_window is null. Do nothing.");
+                       LogB.Information("splash_window is null. Do nothing.");
                else {
-                       Log.WriteLine("splash_window is not null. Destroying now...");
+                       LogB.Warning("splash_window is not null. Destroying now...");
                        
                        SplashWindowBox.splash_window.Destroy ();
                        
-                       Log.WriteLine("Destroyed!");
+                       LogB.Information("Destroyed!");
                }
        }
 
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 87cc162..1d5a1fb 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -540,7 +540,7 @@ public partial class ChronoJumpWindow {
                                myStatType.MarkSelected(myText);
                                myStatType.CreateOrUpdateAVGAndSD();
                        } catch {
-                               Log.WriteLine("Do later!!");
+                               LogB.Warning("Do later!!");
                        }
                }
        }
@@ -792,7 +792,7 @@ public partial class ChronoJumpWindow {
                if(blockFillingTreeview)
                        return false;
                
-               Log.WriteLine("----------FILLING treeview stats---------------");
+               LogB.Information("----------FILLING treeview stats---------------");
        
                string statisticType = UtilGtk.ComboGetActive(combo_stats_stat_type);
                string statisticSubType = UtilGtk.ComboGetActive(combo_stats_stat_subtype);
@@ -913,7 +913,7 @@ public partial class ChronoJumpWindow {
                                button_add_to_report.Sensitive = false;
                        }
                } catch {
-                       Log.WriteLine("Do markedRows stuff later");
+                       LogB.Warning("Do markedRows stuff later");
                }
 
                //show enunciate of the stat in textview_enunciate
@@ -956,19 +956,19 @@ public partial class ChronoJumpWindow {
 
        //changes the combo_select_checkboxes to "Selected" if any row in the treeview is checked or unchecked
        private void on_fake_button_row_checked_clicked (object o, EventArgs args) {
-               Log.WriteLine("fakeButtonRowCheckedUnchecked in gui/stats.cs !!");
+               LogB.Information("fakeButtonRowCheckedUnchecked in gui/stats.cs !!");
 
                combo_select_checkboxes.Active = UtilGtk.ComboMakeActive(comboCheckboxesOptions, 
Catalog.GetString("Selected"));
        }
        
        private void on_fake_button_rows_selected_clicked (object o, EventArgs args) {
-               Log.WriteLine("fakeButtonRowsSelected in gui/stats.cs !!");
+               LogB.Information("fakeButtonRowsSelected in gui/stats.cs !!");
                button_graph.Sensitive = true;
                button_add_to_report.Sensitive = true;
        }
        
        private void on_fake_button_no_rows_selected_clicked (object o, EventArgs args) {
-               Log.WriteLine("fakeButtonNoRowsSelected in gui/stats.cs !!");
+               LogB.Information("fakeButtonNoRowsSelected in gui/stats.cs !!");
                button_graph.Sensitive = false;
                button_add_to_report.Sensitive = false;
 
@@ -1178,7 +1178,7 @@ public partial class ChronoJumpWindow {
        {
                if(o == (object) radiobutton_current_session) 
                {
-                       Log.WriteLine("current");
+                       LogB.Information("current");
                        button_stats_select_sessions.Sensitive = false;
 
                        //single session can have all graph types
@@ -1197,7 +1197,7 @@ public partial class ChronoJumpWindow {
                } 
                else if (o == (object) radiobutton_selected_sessions ) 
                {
-                       Log.WriteLine("selected");
+                       LogB.Information("selected");
                        button_stats_select_sessions.Sensitive = true;
                        
                        //multi session use only barplot and lines
@@ -1242,13 +1242,13 @@ public partial class ChronoJumpWindow {
        }
        
        private void on_button_stats_select_sessions_clicked (object o, EventArgs args) {
-               Log.WriteLine("select sessions for stats");
+               LogB.Information("select sessions for stats");
                sessionSelectStatsWin = SessionSelectStatsWindow.Show(app1, selectedSessions);
                sessionSelectStatsWin.Button_accept.Clicked += new 
EventHandler(on_stats_select_sessions_accepted);
        }
        
        private void on_stats_select_sessions_accepted (object o, EventArgs args) {
-               Log.WriteLine("select sessions for stats accepted");
+               LogB.Information("select sessions for stats accepted");
                
                if ((sessionSelectStatsWin.ArrayOfSelectedSessions[0]).ToString() != "-1") { 
                        //there are sessionsSelected, put them in selectedSessions ArrayList
@@ -1265,7 +1265,7 @@ public partial class ChronoJumpWindow {
        }
        
        private void on_button_add_to_report_clicked (object o, EventArgs args) {
-               Log.WriteLine("add to report window");
+               LogB.Information("add to report window");
 
                string statisticType = UtilGtk.ComboGetActive(combo_stats_stat_type);
                string statisticSubType = UtilGtk.ComboGetActive(combo_stats_stat_subtype);
diff --git a/src/log.cs b/src/log.cs
index af12011..8dea210 100644
--- a/src/log.cs
+++ b/src/log.cs
@@ -23,95 +23,11 @@ using System.IO;            //for detect OS
 
 public class Log
 {
-       /*
-        * writes to screen and to log
-        * timeLog ensures a different log for every chronojump launch
-        * log is deleted if all ends ok.
-        */
-       
-       //private static TextWriter writer; //writer is not used now, all is thone in the Main (on 
chronojump.cs).we only need to print to console now (0.7.5)
-       //private static string timeLog = "";
-       //private static bool useConsole = true; //for the new method on chronojump.cs for redirecting output 
and error to same file also on windows (0.7.5)
-       
        //1.4.10 have log again by default to all windows users
        //only two logs: current execution log and previous execution log
        private static TextWriter writer;
        private static bool useConsole;
                                
-       /*
-       private static bool initializeTime(string [] args) {
-               if(! Directory.Exists(GetDir())) {
-                       try { 
-                               Directory.CreateDirectory(GetDir());
-                       } catch {}
-               }
-
-               bool timeLogPassedOk = true;
-               if(args.Length == 1) 
-                       timeLog = args[0];
-               else {
-                       timeLog = DateTime.Now.ToString();
-                       timeLogPassedOk = false;
-               }
-
-               return timeLogPassedOk;
-       }
-       */
-
-       /*
-       public static string GetDir() {
-               //we are on:
-               //Chronojump/chronojump-x.y/data/
-               //we have to go to
-               //Chronojump/logs
-               //return ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + "logs";
-               
-               //fixing:
-               //http://lists.ximian.com/pipermail/mono-list/2008-November/040480.html
-               return Path.Combine(
-                               Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
-                               "Chronojump/logs");
-       }
-       
-       public static string GetFile() {
-               return Path.GetFullPath(GetDir() + Path.DirectorySeparatorChar + "" + timeLog + ".txt");
-       }
-       */
-       
-//     public static bool Start(string [] args) {
-               /* this is ok for define a time that will be the name of the log file
-                * if program ends ok, it will delete that file. 
-                * The problem is that i don't know how to redirect a crash there.
-                */
-
-              /* a solution is to put on chronojump.sh
-               * 
-               * LOG_DATE=`date +%d-%m-%Y_%H-%M-%S`
-               * LOG_FILE="../../logs/$LOG_DATE.txt"
-               * mono chronojump.prg $LOG_FILE 2>>$LOG_FILE
-               *
-               * if chronojump it's called from .sh (that's the normal thing), then all will work:
-               * log of the app and adding the crash log at end
-               *
-               * if chronojump it's called directly like mono chronojump.prg, 
-               * then log filename will be created here, and there will be no redirection on crash 
-               *
-               * study how to do it in the bat file for windows
-               */
-
-       /*      
-               bool timeLogPassedOk = initializeTime(args);
-               
-               if(useConsole)
-                       Console.WriteLine(GetFile());
-//             try {
-//                     writer = File.CreateText(GetFile());
-//             } catch {}
-               
-               return timeLogPassedOk;
-       }
-       */
-
 
        //on Windows since 1.4.10
        public static void Start() 
@@ -159,32 +75,6 @@ public class Log
                sw.AutoFlush = true;
        }
 
-       public static void Write(string text) 
-       {
-               if(useConsole)
-                       Console.Write(text);
-               else {
-                       try {
-                               writer.Write(text);
-                               writer.Flush();
-                       } catch {}
-               }
-       }
-       
-       public static void WriteLine(string text) 
-       {
-               if(useConsole) {
-                       //Console.WriteLine(text);
-                       LogB.Information(text);
-               }
-               else {
-                       try {
-                       writer.WriteLine(text);
-                       writer.Flush();
-                       } catch {}
-               }
-       }
-       
        public static void End() 
        {
                if(useConsole)
@@ -196,15 +86,7 @@ public class Log
                }
        }
        
-       //if exit normally, then delete file
-       /*
-       public static void Delete() {
-               try {
-                       File.Delete(GetFile());
-               } catch {}
-       }
-       */
-
+       
        /*
        //GetLast should NOT return the newer log: the just created and empty file, 
        //it should return the just before the last, that's the log of when chronojump crashed last time
diff --git a/src/logB.cs b/src/logB.cs
index 3f318d9..eb774ee 100644
--- a/src/logB.cs
+++ b/src/logB.cs
@@ -6,6 +6,8 @@
 //
 // Copyright (C) 2005-2007 Novell, Inc.
 //
+// Minor fixes by Xavier de Blas <xaviblas gmail com> 2014 
+//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
diff --git a/src/logConsoleCrayon.cs b/src/logConsoleCrayon.cs
index 109fdab..06df36c 100644
--- a/src/logConsoleCrayon.cs
+++ b/src/logConsoleCrayon.cs
@@ -6,6 +6,8 @@
 //
 // Copyright (C) 2008 Novell, Inc.
 //
+// Minor fixes by Xavier de Blas <xaviblas gmail com> 2014 
+//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
diff --git a/src/oldCodeNeedToDBConvert/person.cs b/src/oldCodeNeedToDBConvert/person.cs
index 4ea2a0d..23dbb8b 100644
--- a/src/oldCodeNeedToDBConvert/person.cs
+++ b/src/oldCodeNeedToDBConvert/person.cs
@@ -100,7 +100,7 @@ public partial class PersonOld {
                //we need uniqueID for personSession
                uniqueID = insertedID;
 
-               Log.WriteLine(this.ToString());
+               LogB.Information(this.ToString());
 
                //insert in the personSession table (fast way of knowing who was in each session)
                SqlitePersonSessionOld.Insert (false, Constants.PersonSessionOldWeightTable, "-1", uniqueID, 
sessionID, weight);
diff --git a/src/oldCodeNeedToDBConvert/personSession.cs b/src/oldCodeNeedToDBConvert/personSession.cs
index ecf31c8..7ac0748 100644
--- a/src/oldCodeNeedToDBConvert/personSession.cs
+++ b/src/oldCodeNeedToDBConvert/personSession.cs
@@ -58,7 +58,7 @@ public partial class PersonSessionOld {
                //we need uniqueID for personSession
                uniqueID = insertedID;
 
-               Log.WriteLine(this.ToString());
+               LogB.Information(this.ToString());
        }
        
        //used to select a personSession at Sqlite.convertTables
diff --git a/src/oldCodeNeedToDBConvert/sqlite/person.cs b/src/oldCodeNeedToDBConvert/sqlite/person.cs
index 495aa34..3a25f6e 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/person.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/person.cs
@@ -73,7 +73,7 @@ class SqlitePersonOld : Sqlite
                        race + ", " + countryID + ", " + serverUniqueID + ")" ;
                
                dbcmd.CommandText = myString;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                int myReturn = -10000; //dbcon.LastInsertRowId;
 
@@ -87,7 +87,7 @@ class SqlitePersonOld : Sqlite
        public ArrayList SelectAllPersons()
        {
                dbcmd.CommandText = "SELECT * FROM " + Constants.PersonOldTable + " ORDER BY uniqueID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
                
@@ -124,7 +124,7 @@ class SqlitePersonOld : Sqlite
        {
                dbcmd.CommandText = "Delete FROM " + Constants.PersonOldTable +
                        " WHERE uniqueID == " + uniqueID.ToString();
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
 
diff --git a/src/oldCodeNeedToDBConvert/sqlite/personSession.cs 
b/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
index 71c84cb..538825e 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
@@ -66,7 +66,7 @@ class SqlitePersonSessionOld : Sqlite
        public ArrayList SelectAllPersonSessionsOfAPerson(int personID)
        {
                dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionOldWeightTable + " WHERE 
personID == " + personID + " ORDER BY uniqueID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
                
@@ -132,7 +132,7 @@ class SqlitePersonSessionOld : Sqlite
        {
                dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionOldWeightTable + 
                        " WHERE personID == " + personID;
-               //Log.WriteLine(dbcmd.CommandText.ToString());
+               //LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
diff --git a/src/person.cs b/src/person.cs
index a5066db..fb752ed 100644
--- a/src/person.cs
+++ b/src/person.cs
@@ -88,7 +88,7 @@ public partial class Person {
                //we need uniqueID for personSession
                uniqueID = insertedID;
 
-               Log.WriteLine(this.ToString());
+               LogB.Information(this.ToString());
        }
        
        public int InsertAtDB (bool dbconOpened, string tableName) {
diff --git a/src/personSession.cs b/src/personSession.cs
index fac8f27..9c874e8 100644
--- a/src/personSession.cs
+++ b/src/personSession.cs
@@ -82,7 +82,7 @@ public partial class PersonSession {
                int insertedID = this.InsertAtDB(dbconOpened, Constants.PersonSessionTable);
                uniqueID = insertedID;
 
-               Log.WriteLine(this.ToString());
+               LogB.Information(this.ToString());
        }
        
        public int InsertAtDB (bool dbconOpened, string tableName) {
diff --git a/src/platform.cs b/src/platform.cs
index 439d5f5..8ba1ccb 100644
--- a/src/platform.cs
+++ b/src/platform.cs
@@ -47,7 +47,7 @@ public class Platform {
                if(stream[1] == "0") { state = false; }
                else if (stream[1] == "1") { state = true; }
                else { 
-                       Log.WriteLine(Catalog.GetString("Error, state '{0}' non valid"), stream[1]);
+                       LogB.Error(Catalog.GetString("Error, state '{0}' non valid"), stream[1]);
                }
        }
 
diff --git a/src/server.cs b/src/server.cs
index 01a50a7..baa8df8 100644
--- a/src/server.cs
+++ b/src/server.cs
@@ -55,7 +55,7 @@ public class Server
        public static string Ping(bool doInsertion, string progName, string progVersion) {
                try {
                        ChronojumpServer myServer = new ChronojumpServer();
-                       Log.WriteLine(myServer.ConnectDatabase());
+                       LogB.Information(myServer.ConnectDatabase());
                
                        int evalSID = Convert.ToInt32(SqlitePreferences.Select("evaluatorServerID"));
                        string machineID = SqlitePreferences.Select("machineID");
@@ -68,10 +68,10 @@ public class Server
                        //is ok for uploadPerson to know if server is online
                        string versionAvailable = myServer.UploadPing(myPing, doInsertion);
                        
-                       Log.WriteLine(myServer.DisConnectDatabase());
+                       LogB.Information(myServer.DisConnectDatabase());
                        return versionAvailable;
                } catch (Exception e){
-                       Log.WriteLine("Server Connection "+e.Message);
+                       LogB.Information("Server Connection", e.Message);
                        return Constants.ServerOffline;
                }
        }
@@ -120,7 +120,7 @@ public class Server
        {
                if(! thread.IsAlive) {
                        sessionUploadWin.UploadFinished();
-                       Log.Write("dying");
+                       LogB.Information("dying");
                        return false;
                }
 
@@ -155,7 +155,7 @@ public class Server
                }
                
                Thread.Sleep (50);
-               Log.Write(thread.ThreadState.ToString());
+               LogB.Debug(thread.ThreadState.ToString());
                return true;
        }
        
@@ -165,7 +165,7 @@ public class Server
 
                try {   
                        ChronojumpServer myServer = new ChronojumpServer();
-                       Log.WriteLine(myServer.ConnectDatabase());
+                       LogB.Information(myServer.ConnectDatabase());
                
                        int state = (int) Constants.ServerSessionStates.UPLOADINGSESSION;
                        //create ServerSession based on Session currentSession
@@ -551,7 +551,7 @@ public class Server
                        //myServer.UpdateSession(currentSession.ServerUniqueID, (ServerSessionStates)  
Constants.ServerSessionStates.DONE); 
                        myServer.UpdateSession(currentSession.ServerUniqueID, state); 
 
-                       Log.WriteLine(myServer.DisConnectDatabase());
+                       LogB.Information(myServer.DisConnectDatabase());
                } catch {
                        //other thread updates the gui:
                        serverSessionError = true;
@@ -643,7 +643,7 @@ public class Server
        public static void ServerUploadEvaluator () {
                try {
                        ChronojumpServer myServer = new ChronojumpServer();
-                       Log.WriteLine(myServer.ConnectDatabase());
+                       LogB.Information(myServer.ConnectDatabase());
                        
                        ServerEvaluator myEval = SqliteServer.SelectEvaluator(1);
 
@@ -668,7 +668,7 @@ public class Server
                                new DialogMessage(Constants.MessageTypes.WARNING, 
                                                string.Format(Catalog.GetString("Evaluator {0} has not been 
correctly uploaded. Maybe codes doesn't match."), evalSID));
                        
-                       Log.WriteLine(myServer.DisConnectDatabase());
+                       LogB.Information(myServer.DisConnectDatabase());
                } catch {
                        new DialogMessage(Constants.MessageTypes.WARNING, Constants.ServerOffline);
                }
diff --git a/src/session.cs b/src/session.cs
index 3334c29..1412846 100644
--- a/src/session.cs
+++ b/src/session.cs
@@ -89,7 +89,7 @@ public partial class Session {
                uniqueID = insertedID;
 
 
-               Log.WriteLine(this.ToString());
+               LogB.Information(this.ToString());
        }
 
        //used to select a session at Sqlite.convertTables
diff --git a/src/sqlite/country.cs b/src/sqlite/country.cs
index ef3e1b3..4e45b34 100644
--- a/src/sqlite/country.cs
+++ b/src/sqlite/country.cs
@@ -84,7 +84,7 @@ class SqliteCountry : Sqlite
                        nameEnglish + "\", \"" + continent + "\")";
 
                mycmd.CommandText = myString;
-               Log.WriteLine(mycmd.CommandText.ToString());
+               LogB.SQL(mycmd.CommandText.ToString());
                mycmd.ExecuteNonQuery();
 
                /*
@@ -105,7 +105,7 @@ class SqliteCountry : Sqlite
                
                dbcmd.CommandText = "SELECT uniqueID, name FROM " + Constants.CountryTable + " WHERE 
continent == '" + continent + "'";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -140,7 +140,7 @@ class SqliteCountry : Sqlite
                
                dbcmd.CommandText = "SELECT * FROM " + Constants.CountryTable + " WHERE uniqueID == " + 
uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -162,7 +162,7 @@ class SqliteCountry : Sqlite
        public static bool TableHasOldRepublicStuff() {
                dbcmd.CommandText = "SELECT name FROM " + Constants.CountryTable + " WHERE code == 'DZA'";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -175,7 +175,7 @@ class SqliteCountry : Sqlite
                else 
                        hasRepublicStuff = true;
 
-               Log.WriteLine(reader[0].ToString() + " " + hasRepublicStuff);
+               LogB.SQL(reader[0].ToString() + " " + hasRepublicStuff);
                
                reader.Close();
                return hasRepublicStuff;
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index 7149584..8b3ea09 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -90,7 +90,7 @@ class SqliteEncoder : Sqlite
                        removeURLpath(es.videoURL) + "', '" + 
                        es.encoderConfiguration.ToString(":",true) + "', '" + 
                        Util.ConvertToPoint(es.future1) + "', '" + es.future2 + "', '" + es.future3 + "')";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -144,7 +144,7 @@ class SqliteEncoder : Sqlite
                                "', future3 = '" + es.future3 + 
                                "' WHERE uniqueID == " + es.uniqueID ;
 
-               Log.WriteLine(mycmd.CommandText.ToString());
+               LogB.SQL(mycmd.CommandText.ToString());
                mycmd.ExecuteNonQuery();
 
                if(! dbconOpened)
@@ -156,7 +156,7 @@ class SqliteEncoder : Sqlite
                int count = 0;
                int countActive = 0;
 
-               Log.WriteLine("Starting transaction");
+               LogB.SQL("Starting transaction");
                Sqlite.Open();
                
                using(SqliteTransaction tr = dbcon.BeginTransaction())
@@ -182,7 +182,7 @@ class SqliteEncoder : Sqlite
                }
 
                Sqlite.Close();
-               Log.WriteLine("Ended transaction");
+               LogB.SQL("Ended transaction");
                return countActive;
        }
        
@@ -255,7 +255,7 @@ class SqliteEncoder : Sqlite
                        " ORDER BY substr(filename,-23,19), " + //'filename,-23,19' has the date of capture 
signal
                        "uniqueID " + orderIDstr; 
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -276,7 +276,7 @@ class SqliteEncoder : Sqlite
                        if(reader[14].ToString() != "")
                                videoURL = addURLpath(fixOSpath(reader[14].ToString()));
                        
-                       //Log.WriteLine(econf.ToString(":", true));
+                       //LogB.SQL(econf.ToString(":", true));
                        es = new EncoderSQL (
                                        reader[0].ToString(),                   //uniqueID
                                        Convert.ToInt32(reader[1].ToString()),  //personID      
@@ -333,7 +333,7 @@ class SqliteEncoder : Sqlite
                        " encoder.personID == person77.uniqueID AND encoder.sessionID == session.uniqueID " +
                        " GROUP BY encoder.sessionID ORDER BY encoder.sessionID, encoder.status";
        
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -393,7 +393,7 @@ class SqliteEncoder : Sqlite
                dbcmd.CommandText = "INSERT INTO " + Constants.EncoderSignalCurveTable +  
                        " (uniqueID, signalID, curveID, msCentral, future1) " + 
                        "VALUES (NULL, " + signalID + ", " + curveID + ", " + msCentral + ", '')";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if(! dbconOpened)
@@ -436,7 +436,7 @@ class SqliteEncoder : Sqlite
                        " FROM " + Constants.EncoderSignalCurveTable + 
                        whereStr + signalIDstr + curveIDstr + msCentralstr;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -465,7 +465,7 @@ class SqliteEncoder : Sqlite
 
                dbcmd.CommandText = "Delete FROM " + Constants.EncoderSignalCurveTable +
                        " WHERE curveID == " + curveID.ToString();
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if( ! dbconOpened)
@@ -530,7 +530,7 @@ class SqliteEncoder : Sqlite
                                " (uniqueID, name, percentBodyWeight, ressistance, description, future1, 
future2, future3)" +
                                " VALUES (NULL, '" + name + "', " + percentBodyWeight + ", '" + 
                                ressistance + "', '" + description + "', '" + speed1RM + "', '', '')";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                if(! dbconOpened)
@@ -598,7 +598,7 @@ class SqliteEncoder : Sqlite
                                "', future1 = '" + speed1RM +
                                "' WHERE name = '" + nameOld + "'" ;
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                if(! dbconOpened)
@@ -621,7 +621,7 @@ class SqliteEncoder : Sqlite
                else
                        dbcmd.CommandText = "SELECT * FROM " + Constants.EncoderExerciseTable + uniqueIDStr;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -676,7 +676,7 @@ class SqliteEncoder : Sqlite
                        " AND " + Constants.SessionTable + ".uniqueID == " + Constants.EncoderTable + 
".sessionID " + 
                        " GROUP BY sessionID, personID";
                        
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -706,7 +706,7 @@ class SqliteEncoder : Sqlite
                dbcmd.CommandText = "UPDATE " + Constants.EncoderExerciseTable + 
                        " SET future2 = 90, future3 = 90";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
        
@@ -715,7 +715,7 @@ class SqliteEncoder : Sqlite
                dbcmd.CommandText = "UPDATE " + Constants.EncoderExerciseTable + 
                        " SET future2 = '', future3 = ''";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
        
@@ -747,7 +747,7 @@ class SqliteEncoder : Sqlite
                                " (uniqueID, personID, sessionID, exerciseID, load1RM, future1, future2, 
future3)" +
                                " VALUES (NULL, " + personID + ", " + sessionID + ", " + 
                                exerciseID + ", " + Util.ConvertToPoint(load1RM) + ", '','','')";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                if(! dbconOpened)
@@ -796,7 +796,7 @@ class SqliteEncoder : Sqlite
                        dbcmd.CommandText = "SELECT * FROM " + Constants.Encoder1RMTable + whereStr +
                                " ORDER BY uniqueID DESC"; //this allows to select the last uniqueID because 
will be the first in the returned array 
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -855,14 +855,14 @@ class SqliteEncoder : Sqlite
        {
                int [] signalInts = Util.ReadFileAsInts(signalFile);
                /*      
-               Log.WriteLine("found INTS");
+               LogB.SQL("found INTS");
                for(int i=0; i < signalInts.Length; i ++)
                        Log.Write(signalInts[i] + " ");
                */      
 
                int [] curveInts = Util.ReadFileAsInts(curveFile);
                /*
-               Log.WriteLine("found INTS");
+               LogB.SQL("found INTS");
                for(int i=0; i < curveInts.Length; i ++)
                        Log.Write(curveInts[i] + " ");
                */
@@ -874,8 +874,8 @@ class SqliteEncoder : Sqlite
                                        break;
                        
                        if(c == curveInts.Length) {
-                               //Log.WriteLine("Start at: " + s);
-                               //Log.WriteLine("Middle at: " + s + Convert.ToInt32(c / 2));
+                               //LogB.SQL("Start at: " + s);
+                               //LogB.SQL("Middle at: " + s + Convert.ToInt32(c / 2));
                                return s + Convert.ToInt32(c / 2);
                        }
                }
diff --git a/src/sqlite/event.cs b/src/sqlite/event.cs
index 9e94287..d1a2a8a 100644
--- a/src/sqlite/event.cs
+++ b/src/sqlite/event.cs
@@ -55,7 +55,7 @@ class SqliteEvent : Sqlite
                dbcmd.CommandText = "INSERT INTO graphLinkTable" + 
                                "(uniqueID, tableName, eventName, graphFileName, other1, other2)" +
                                " VALUES (NULL, '" + tableName + "', '" + eventName + "', '" + graphFileName 
+ "', '', '')" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                //int myLast = dbcon.LastInsertRowId;
                //http://stackoverflow.com/questions/4341178/getting-the-last-insert-id-with-sqlite-net-in-c
@@ -76,7 +76,7 @@ class SqliteEvent : Sqlite
 
                dbcmd.CommandText = "SELECT graphFileName FROM graphLinkTable WHERE tableName == '" + 
tableName + "' AND eventName =='" + eventName + "'";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -101,7 +101,7 @@ class SqliteEvent : Sqlite
 
                dbcmd.CommandText = "UPDATE " + tableName + " SET simulated = " + simulated + 
                        " WHERE uniqueID == " + uniqueID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                if(!dbconOpened)
@@ -114,7 +114,7 @@ class SqliteEvent : Sqlite
        {
                dbcmd.CommandText = "UPDATE " + tableName + " SET simulated = -1" + 
                        " WHERE simulated == 1";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
        public static void SimulatedConvertToNegative() 
diff --git a/src/sqlite/executeAuto.cs b/src/sqlite/executeAuto.cs
index a181aaa..62031ce 100644
--- a/src/sqlite/executeAuto.cs
+++ b/src/sqlite/executeAuto.cs
@@ -72,7 +72,7 @@ class SqliteExecuteAuto : Sqlite
                        eaSQL.SerieIDsToStr(eaSQL.Serie2IDs) + "', '" + 
                        eaSQL.SerieIDsToStr(eaSQL.Serie3IDs) + "', " + 
                        "'', '', '')"; //future1, future2, future3
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                if(! dbconOpened)
@@ -110,7 +110,7 @@ class SqliteExecuteAuto : Sqlite
                };
                
                foreach(IDName idName in jList.l) {
-                       Log.WriteLine(idName.ToString());
+                       LogB.SQL(idName.ToString());
                }
                
                foreach(ExecuteAutoSQL eaSQL in eaSQLlist) {
@@ -132,7 +132,7 @@ class SqliteExecuteAuto : Sqlite
                        whereStr = " WHERE uniqueID == " + uniqueID;
 
                dbcmd.CommandText = "SELECT * from " + Constants.ExecuteAutoTable + whereStr; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
 
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
diff --git a/src/sqlite/jump.cs b/src/sqlite/jump.cs
index dccc594..9aa6dd6 100644
--- a/src/sqlite/jump.cs
+++ b/src/sqlite/jump.cs
@@ -79,7 +79,7 @@ class SqliteJump : Sqlite
                                + Util.ConvertToPoint(tv) + ", " + Util.ConvertToPoint(tc) + ", " + 
Util.ConvertToPoint(fall) + ", '" 
                                + Util.ConvertToPoint(weight) + "', '" + description + "', "
                                + Util.ConvertToPoint(angle) + ", " + simulated +")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -132,7 +132,7 @@ class SqliteJump : Sqlite
                        " AND " + tps + ".sessionID == jump.sessionID " +
                        " ORDER BY upper(" + tp + ".name), jump.uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -184,7 +184,7 @@ class SqliteJump : Sqlite
 
                dbcmd.CommandText = "SELECT * FROM jump WHERE uniqueID == " + uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -214,7 +214,7 @@ class SqliteJump : Sqlite
                        ", description = '" + description +
                        "', angle = " + Util.ConvertToPoint(angle) +
                        " WHERE uniqueID == " + jumpID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -224,7 +224,7 @@ class SqliteJump : Sqlite
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + tableName + " SET weight = " + Util.ConvertToPoint(weight) + 
                        " WHERE uniqueID == " + uniqueID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -234,7 +234,7 @@ class SqliteJump : Sqlite
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + tableName + " SET description = '" + description + 
                        "' WHERE uniqueID == " + uniqueID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -243,15 +243,15 @@ class SqliteJump : Sqlite
        public static void ChangeWeightToL()
        {
                dbcmd.CommandText = "UPDATE jump SET type = 'SJl' WHERE type == 'SJ+'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                dbcmd.CommandText = "UPDATE jump SET type = 'CMJl' WHERE type == 'CMJ+'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                dbcmd.CommandText = "UPDATE jump SET type = 'ABKl' WHERE type == 'ABK+'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
 }
diff --git a/src/sqlite/jumpRj.cs b/src/sqlite/jumpRj.cs
index c2d130c..4fb4888 100644
--- a/src/sqlite/jumpRj.cs
+++ b/src/sqlite/jumpRj.cs
@@ -76,7 +76,7 @@ class SqliteJumpRj : SqliteJump
                                Util.ConvertToPoint(tvAvg) + ", " + Util.ConvertToPoint(tcAvg) + ", '" + 
                                Util.ConvertToPoint(tvString) + "', '" + Util.ConvertToPoint(tcString) + "', 
" +
                                jumps + ", " + Util.ConvertToPoint(time) + ", '" + limited + "', '" + 
angleString + "', " + simulated +")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -124,7 +124,7 @@ class SqliteJumpRj : SqliteJump
                        " AND " + tps + ".sessionID == jumpRj.sessionID " +
                        " ORDER BY upper(" + tp + ".name), jumpRj.uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -181,7 +181,7 @@ class SqliteJumpRj : SqliteJump
 
                dbcmd.CommandText = "SELECT * FROM " + tableName + " WHERE uniqueID == " + uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -204,7 +204,7 @@ class SqliteJumpRj : SqliteJump
                        ", weight = " + Util.ConvertToPoint(weight) + 
                        ", description = '" + description +
                        "' WHERE uniqueID == " + jumpID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -217,7 +217,7 @@ class SqliteJumpRj : SqliteJump
 
                dbcmd.CommandText = "SELECT uniqueID, tcstring, tvstring, jumps, limited FROM jumpRj";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -226,7 +226,7 @@ class SqliteJumpRj : SqliteJump
 
                while(reader.Read()) {
                        if(Util.GetNumberOfJumps(reader[1].ToString(), true) != 
Util.GetNumberOfJumps(reader[2].ToString(), true)) {
-                               Log.WriteLine(string.Format("Problem with jumpRj: {0}, tcstring{1}, 
tvstring{2}, jumps{3}, limited{4}", 
+                               LogB.Error(string.Format("Problem with jumpRj: {0}, tcstring{1}, tvstring{2}, 
jumps{3}, limited{4}", 
                                                reader[0].ToString(), 
                                                Util.GetNumberOfJumps(reader[1].ToString(), true).ToString(), 
                                                Util.GetNumberOfJumps(reader[2].ToString(), true).ToString(), 
diff --git a/src/sqlite/jumpType.cs b/src/sqlite/jumpType.cs
index 827fdf7..1f58820 100644
--- a/src/sqlite/jumpType.cs
+++ b/src/sqlite/jumpType.cs
@@ -161,7 +161,7 @@ class SqliteJumpType : Sqlite
                                " VALUES (NULL, '"
                                + myStr[0] + "', " + myStr[1] + ", " +  //name, startIn
                                myStr[2] + ", '" + myStr[3] + "')" ;    //weight, description
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                if(! dbconOpened) {
                        Sqlite.Close();
@@ -180,7 +180,7 @@ class SqliteJumpType : Sqlite
                                + myStr[0] + "', " + myStr[1] + ", " +  //name, startIn
                                myStr[2] + ", " + myStr[3] + ", " +     //weight, jumpsLimited
                                myStr[4] + ", '" + myStr[5] + "')" ;    //fixedValue, description
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                if(! dbconOpened) {
                        Sqlite.Close();
@@ -209,7 +209,7 @@ class SqliteJumpType : Sqlite
                        whereString +
                        " ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -248,11 +248,11 @@ class SqliteJumpType : Sqlite
                count =0;
                if(allJumpsName != "") {
                        myTypes [count++] = allJumpsName;
-                       //Log.WriteLine("{0} - {1}", myTypes[count-1], count-1);
+                       //LogB.SQL("{0} - {1}", myTypes[count-1], count-1);
                }
                foreach (string line in myArray) {
                        myTypes [count++] = line;
-                       //Log.WriteLine("{0} - {1}", myTypes[count-1], count-1);
+                       //LogB.SQL("{0} - {1}", myTypes[count-1], count-1);
                }
 
                return myTypes;
@@ -265,7 +265,7 @@ class SqliteJumpType : Sqlite
                        " FROM " + Constants.JumpRjTypeTable + " " +
                        " ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -321,7 +321,7 @@ class SqliteJumpType : Sqlite
                        " WHERE name  = '" + typeName +
                        "' ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -353,7 +353,7 @@ class SqliteJumpType : Sqlite
                        " WHERE name  = '" + typeName +
                        "' ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -395,7 +395,7 @@ class SqliteJumpType : Sqlite
                        " FROM " + tableName +
                        " WHERE name == '" + typeName + "'";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -405,9 +405,9 @@ class SqliteJumpType : Sqlite
                while(reader.Read()) {
                        if(reader[0].ToString() == "1") {
                                hasWeight = true;
-                               Log.WriteLine("found type: hasWeight");
+                               LogB.SQL("found type: hasWeight");
                        } else {
-                               Log.WriteLine("found type: NO hasWeight");
+                               LogB.SQL("found type: NO hasWeight");
                        }
                }
                reader.Close();
@@ -423,7 +423,7 @@ class SqliteJumpType : Sqlite
                        " FROM " + tableName +
                        " WHERE name == '" + typeName + "'";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -446,7 +446,7 @@ class SqliteJumpType : Sqlite
                //Sqlite.Open();
                dbcmd.CommandText = "UPDATE jumpType SET name = '" + nameNew + 
                        "' WHERE name == '" + nameOld + "'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                //Sqlite.Close();
        }
@@ -456,7 +456,7 @@ class SqliteJumpType : Sqlite
                //Sqlite.Open();
                dbcmd.CommandText = "UPDATE jumpType SET " + column + " = '" + newValue + 
                        "' WHERE name == '" + typeName + "'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                //Sqlite.Close();
        }
@@ -467,7 +467,7 @@ class SqliteJumpType : Sqlite
                        Sqlite.Open();
                dbcmd.CommandText = "Delete FROM " + tableName + 
                        " WHERE name == '" + name + "'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                if(!dbconOpened)
                        Sqlite.Close();
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 2d3aa5d..8f16287 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -167,7 +167,7 @@ class Sqlite
                dbcmd = dbcon.CreateCommand();
 
                /*
-               Log.WriteLine(string.Format("press3"));
+               LogB.SQL(string.Format("press3"));
                splashMessage = "post1";
                needUpdateSplashMessage = true;
                Console.ReadLine();             
@@ -175,7 +175,7 @@ class Sqlite
 
                /*
                try{
-                       Log.WriteLine(string.Format("Trying database in ... " + connectionString));
+                       LogB.SQL(string.Format("Trying database in ... " + connectionString));
 
                //dbcon = new SqliteConnection();
                        */
@@ -185,13 +185,13 @@ class Sqlite
                        dbcmd = dbcon.CreateCommand();
                } catch {
                        try {
-                               Log.WriteLine(string.Format("Trying database in ... " + 
connectionStringTemp));
+                               LogB.SQL(string.Format("Trying database in ... " + connectionStringTemp));
 
                //dbcon = new SqliteConnection();
                                dbcon.ConnectionString = connectionStringTemp;
                                dbcmd = dbcon.CreateCommand();
                        } catch { 
-                               Console.WriteLine("Problems, exiting...\n");
+                               LogB.SQL("Problems, exiting...\n");
                                System.Console.Out.Close();
                                Log.End();
                                Log.Delete();
@@ -214,7 +214,7 @@ class Sqlite
 
                //delete blank file if exists
                if (File.Exists(sqlFileBlank)) {
-                       Console.WriteLine("File blank exists, deleting...");
+                       LogB.SQL("File blank exists, deleting...");
                        File.Delete(sqlFileBlank);
                }
 
@@ -233,26 +233,26 @@ class Sqlite
        
        public static void CreateDir()
        {
-               Log.WriteLine(connectionString);
+               LogB.SQL(connectionString);
 
                string applicationDataDir = UtilAll.GetApplicationDataDir();
 
                if(!Directory.Exists(applicationDataDir)) {
-                       Log.WriteLine("creating dir 1...");
+                       LogB.SQL("creating dir 1...");
                        Directory.CreateDirectory (applicationDataDir);
                }
                
                if(!Directory.Exists(home)) {
-                       Log.WriteLine("creating dir 2...");
+                       LogB.SQL("creating dir 2...");
                        Directory.CreateDirectory (home);
                }
-               Log.WriteLine("Dirs created.");
+               LogB.SQL("Dirs created.");
        }
 
        public static void CreateFile()
        {
-               Log.WriteLine("creating file...");
-               Log.WriteLine(connectionString);
+               LogB.SQL("creating file...");
+               LogB.SQL(connectionString);
                
                //      if(!Directory.Exists(home)) {
                //              Directory.CreateDirectory (home);
@@ -283,7 +283,7 @@ class Sqlite
                                //backup the database
                                Util.BackupDirCreateIfNeeded();
                                Util.BackupDatabase();
-                               Log.WriteLine ("made a database backup"); //not compressed yet, it seems 
System.IO.Compression.DeflateStream and
+                               LogB.SQL ("made a database backup"); //not compressed yet, it seems 
System.IO.Compression.DeflateStream and
                                //System.IO.Compression.GZipStream are not in mono
 
                                File.Move(Util.GetDatabaseDir() + Path.DirectorySeparatorChar + 
"chronojump.db",
@@ -297,12 +297,12 @@ class Sqlite
 
        public static bool IsSqlite3() {
                if(sqlite3SelectWorks()){
-                       Log.WriteLine("SQLITE3");
+                       LogB.SQL("SQLITE3");
                        Sqlite.Close();
                        return true;
                }
                else if(sqlite2SelectWorks()) {
-                       Log.WriteLine("SQLITE2");
+                       LogB.SQL("SQLITE2");
                        Sqlite.Close();
                        //write sqlFile path on data/databasePath.txt
                        //TODO
@@ -311,7 +311,7 @@ class Sqlite
                        return false;
                }
                else {
-                       Log.WriteLine("ERROR in sqlite detection");
+                       LogB.SQL("ERROR in sqlite detection");
                        Sqlite.Close();
                        return false;
                }
@@ -394,12 +394,12 @@ class Sqlite
                        }
 
                        if(File.Exists(myPath + Path.DirectorySeparatorChar + sqliteStr)) 
-                               Log.WriteLine("exists1");
+                               LogB.SQL("exists1");
                        if(File.Exists(sqlite2File)) 
-                               Log.WriteLine("exists2");
+                               LogB.SQL("exists2");
 
                        /*
-                       Log.WriteLine("{0}-{1}", myPath + Path.DirectorySeparatorChar + sqliteStr , 
sqlite2File + " .dump");
+                       LogB.SQL("{0}-{1}", myPath + Path.DirectorySeparatorChar + sqliteStr , sqlite2File + 
" .dump");
                        ProcessStartInfo ps = new ProcessStartInfo(myPath + Path.DirectorySeparatorChar + 
sqliteStr , sqlite2File + " .dump");
 
                        ps.UseShellExecute = false;
@@ -419,20 +419,20 @@ class Sqlite
                        writer.WriteLine(scriptsAreTwoDirsAhead + Util.GetDatabaseDir());
                        ((IDisposable)writer).Dispose();
                        
-                       Log.WriteLine("Path written");
+                       LogB.SQL("Path written");
 
                        Process p2 = Process.Start(myPath + Path.DirectorySeparatorChar + "convert_database." 
+ extension);
                        p2.WaitForExit();
 
-                       Log.WriteLine("sqlite3 db created");
+                       LogB.SQL("sqlite3 db created");
                                
                        File.Copy(myPath + Path.DirectorySeparatorChar + "tmp.db", sqliteDB, true ); 
//overwrite
                } catch {
-                       Log.WriteLine("PROBLEMS");
+                       LogB.Error("PROBLEMS");
                        return false;
                }
 
-               Log.WriteLine("done");
+               LogB.SQL("done");
                return true;
 
        }
@@ -463,7 +463,7 @@ class Sqlite
        }
 
        public static bool ConvertToLastChronojumpDBVersion() {
-               Log.WriteLine("SelectChronojumpProfile ()");
+               LogB.SQL("SelectChronojumpProfile ()");
 
                //if(checkIfIsSqlite2())
                //      convertSqlite2To3();
@@ -472,22 +472,22 @@ class Sqlite
 
                currentVersion = SqlitePreferences.Select("databaseVersion");
 
-               //Log.WriteLine("lastDB: {0}", Convert.ToDouble(lastChronojumpDatabaseVersion));
-               //Log.WriteLine("currentVersion: {0}", Convert.ToDouble(currentVersion));
+               //LogB.SQL("lastDB: {0}", Convert.ToDouble(lastChronojumpDatabaseVersion));
+               //LogB.SQL("currentVersion: {0}", Convert.ToDouble(currentVersion));
 
                bool returnSoftwareIsNew = true; //-1 if software is too old for database (moved db to other 
computer)
                if(
                                Convert.ToDouble(Util.ChangeDecimalSeparator(lastChronojumpDatabaseVersion)) 
== 
                                Convert.ToDouble(Util.ChangeDecimalSeparator(currentVersion)))
-                       Log.WriteLine("Database is already latest version");
+                       LogB.SQL("Database is already latest version");
                else if(
                                Convert.ToDouble(Util.ChangeDecimalSeparator(lastChronojumpDatabaseVersion)) 
< 
                                Convert.ToDouble(Util.ChangeDecimalSeparator(currentVersion))) {
-                       Log.WriteLine("User database newer than program, need to update software");
+                       LogB.SQL("User database newer than program, need to update software");
                        returnSoftwareIsNew = false;
                } else {
-                       Log.WriteLine("Old database, need to convert");
-                       Log.WriteLine("db version: " + currentVersion);
+                       LogB.Warning("Old database, need to convert");
+                       LogB.Warning("db version: " + currentVersion);
 
                        bool needToConvertPersonToSport = false;
                        bool jumpFallAsDouble = false;
@@ -510,7 +510,7 @@ class Sqlite
                                SqlitePulseType.initializeTablePulseType();
 
                                SqlitePreferences.Update ("databaseVersion", "0.42", true); 
-                               Log.WriteLine("Converted DB to 0.42 (added pulse and pulseType tables)");
+                               LogB.SQL("Converted DB to 0.42 (added pulse and pulseType tables)");
 
                                Sqlite.Close();
                                currentVersion = "0.42";
@@ -521,7 +521,7 @@ class Sqlite
                                SqlitePulseType.Insert ("Free:-1:-1:free PulseStep mode", true); 
                                SqlitePreferences.Insert ("language", "es-ES"); 
                                SqlitePreferences.Update ("databaseVersion", "0.43", true); 
-                               Log.WriteLine("Converted DB to 0.43 (added 'free' pulseType & language 
peference)");
+                               LogB.SQL("Converted DB to 0.43 (added 'free' pulseType & language 
peference)");
                                Sqlite.Close();
                                currentVersion = "0.43";
                        }
@@ -531,7 +531,7 @@ class Sqlite
                                SqlitePreferences.Insert ("showQIndex", "False"); 
                                SqlitePreferences.Insert ("showDjIndex", "False"); 
                                SqlitePreferences.Update ("databaseVersion", "0.44", true); 
-                               Log.WriteLine("Converted DB to 0.44 (added showQIndex, showDjIndex)");
+                               LogB.SQL("Converted DB to 0.44 (added showQIndex, showDjIndex)");
                                Sqlite.Close();
                                currentVersion = "0.44";
                        }
@@ -540,7 +540,7 @@ class Sqlite
                                Sqlite.Open();
                                SqlitePreferences.Insert ("allowFinishRjAfterTime", "True"); 
                                SqlitePreferences.Update ("databaseVersion", "0.45", true); 
-                               Log.WriteLine("Converted DB to 0.45 (added allowFinishRjAfterTime)");
+                               LogB.SQL("Converted DB to 0.45 (added allowFinishRjAfterTime)");
                                Sqlite.Close();
                                currentVersion = "0.45";
                        }
@@ -549,7 +549,7 @@ class Sqlite
                                Sqlite.Open();
                                SqliteJumpType.JumpTypeInsert ("Free:1:0:Free jump", true); 
                                SqlitePreferences.Update ("databaseVersion", "0.46", true); 
-                               Log.WriteLine("Added Free jump type");
+                               LogB.SQL("Added Free jump type");
                                Sqlite.Close();
                                currentVersion = "0.46";
                        }
@@ -561,7 +561,7 @@ class Sqlite
                                sqliteReactionTimeObject.createTable(Constants.ReactionTimeTable);
 
                                SqlitePreferences.Update ("databaseVersion", "0.47", true); 
-                               Log.WriteLine("Added reaction time table");
+                               LogB.SQL("Added reaction time table");
                                Sqlite.Close();
                                currentVersion = "0.47";
                        }
@@ -575,7 +575,7 @@ class Sqlite
                                sqliteRunIntervalObject.createTable(Constants.TempRunIntervalTable);
 
                                SqlitePreferences.Update ("databaseVersion", "0.48", true); 
-                               Log.WriteLine("created tempJumpReactive and tempRunInterval tables");
+                               LogB.SQL("created tempJumpReactive and tempRunInterval tables");
                                Sqlite.Close();
                                currentVersion = "0.48";
                        }
@@ -606,7 +606,7 @@ class Sqlite
                                SqliteRunType.AddGraphLinksRunSimpleAgility();  
 
                                SqlitePreferences.Update ("databaseVersion", "0.49", true); 
-                               Log.WriteLine("Added graphLinkTable, added Rocket jump and 5 agility tests: 
(20Yard, 505, Illinois, Shuttle-Run & ZigZag. Added graphs pof the 5 agility tests)");
+                               LogB.SQL("Added graphLinkTable, added Rocket jump and 5 agility tests: 
(20Yard, 505, Illinois, Shuttle-Run & ZigZag. Added graphs pof the 5 agility tests)");
 
                                Sqlite.Close();
                                currentVersion = "0.49";
@@ -621,7 +621,7 @@ class Sqlite
                                SqliteJumpType.AddGraphLinks(); 
                                SqliteJumpType.AddGraphLinksRj();       
                                SqlitePreferences.Update ("databaseVersion", "0.50", true); 
-                               Log.WriteLine("changed SJ+ to SJl, same for CMJ+ and ABK+, added jump and 
jumpRj graph links");
+                               LogB.SQL("changed SJ+ to SJl, same for CMJ+ and ABK+, added jump and jumpRj 
graph links");
                                Sqlite.Close();
                                currentVersion = "0.50";
                        }
@@ -631,7 +631,7 @@ class Sqlite
                                SqliteRunType.AddGraphLinksRunSimple(); 
                                SqliteRunIntervalType.AddGraphLinksRunInterval();       
                                SqlitePreferences.Update ("databaseVersion", "0.51", true); 
-                               Log.WriteLine("added graphLinks for run simple and interval");
+                               LogB.SQL("added graphLinks for run simple and interval");
                                Sqlite.Close();
                                currentVersion = "0.51";
                        }
@@ -642,7 +642,7 @@ class Sqlite
                                SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJl", "jump_cmj_l.png", 
true);
                                SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABKl", "jump_abk_l.png", 
true);
                                SqlitePreferences.Update ("databaseVersion", "0.52", true); 
-                               Log.WriteLine("added graphLinks for cmj_l and abk_l, fixed CMJl name");
+                               LogB.SQL("added graphLinks for cmj_l and abk_l, fixed CMJl name");
                                Sqlite.Close();
                                currentVersion = "0.52";
                        }
@@ -659,7 +659,7 @@ class Sqlite
                                SqlitePreferences.Update ("databaseVersion", "0.53", true); 
                                Sqlite.Close();
                                
-                               Log.WriteLine("created weightSession table. Moved person weight data to 
weightSession table for each session that has performed");
+                               LogB.SQL("created weightSession table. Moved person weight data to 
weightSession table for each session that has performed");
                                currentVersion = "0.53";
                        }
                        
@@ -677,7 +677,7 @@ class Sqlite
                                SqlitePreferences.Update ("databaseVersion", "0.54", true); 
                                Sqlite.Close();
                                
-                               Log.WriteLine("Created sport tables. Added sport data, speciallity and level 
of practice to person table");
+                               LogB.SQL("Created sport tables. Added sport data, speciallity and level of 
practice to person table");
                                currentVersion = "0.54";
                        }
                        if(currentVersion == "0.54") {
@@ -688,7 +688,7 @@ class Sqlite
                                SqlitePreferences.Update ("databaseVersion", "0.55", true); 
                                Sqlite.Close();
                                
-                               Log.WriteLine("Added undefined to speciallity table");
+                               LogB.SQL("Added undefined to speciallity table");
                                currentVersion = "0.55";
                        }
                        if(currentVersion == "0.55") {
@@ -699,7 +699,7 @@ class Sqlite
                                SqlitePreferences.Update ("databaseVersion", "0.56", true); 
                                Sqlite.Close();
                                
-                               Log.WriteLine("Added session default sport stuff into session table");
+                               LogB.SQL("Added session default sport stuff into session table");
                                currentVersion = "0.56";
                        }
                        if(currentVersion == "0.56") {
@@ -767,7 +767,7 @@ class Sqlite
                                SqlitePreferences.Update ("databaseVersion", "0.57", true); 
                                Sqlite.Close();
                                
-                               Log.WriteLine("Added simulated column to each event table on client. Added to 
person: race, country, serverUniqueID. Convert to sport related done here if needed. Added also run and 
runInterval initial speed");
+                               LogB.SQL("Added simulated column to each event table on client. Added to 
person: race, country, serverUniqueID. Convert to sport related done here if needed. Added also run and 
runInterval initial speed");
                                currentVersion = "0.57";
                        }
                        if(currentVersion == "0.57") {
@@ -783,7 +783,7 @@ class Sqlite
                                        conversionRate ++;
                                        SqliteCountry.initialize();
                                        conversionRate ++;
-                                       Log.WriteLine("Countries without kingdom or republic (except when 
needed)");
+                                       LogB.SQL("Countries without kingdom or republic (except when 
needed)");
                                }
                                
                                SqlitePreferences.Update ("databaseVersion", "0.58", true); 
@@ -803,7 +803,7 @@ class Sqlite
                                jumpFallAsDouble = true;
 
                                SqlitePreferences.Update ("databaseVersion", "0.59", true); 
-                               Log.WriteLine("Converted DB to 0.59 (added 'showAngle' to preferences, 
changed angle on jump to double)"); 
+                               LogB.SQL("Converted DB to 0.59 (added 'showAngle' to preferences, changed 
angle on jump to double)"); 
                                conversionRate = 2;
                                Sqlite.Close();
                                currentVersion = "0.59";
@@ -828,7 +828,7 @@ class Sqlite
                                SqliteEvent.SimulatedConvertToNegative();
 
                                SqlitePreferences.Update ("databaseVersion", "0.60", true); 
-                               Log.WriteLine("Converted DB to 0.60 (added volumeOn and evaluatorServerID to 
preferences. session has now serverUniqueID. Simulated now are -1, because 0 is real and positive is 
serverUniqueID)"); 
+                               LogB.SQL("Converted DB to 0.60 (added volumeOn and evaluatorServerID to 
preferences. session has now serverUniqueID. Simulated now are -1, because 0 is real and positive is 
serverUniqueID)"); 
                                
                                conversionRate = 4;
                                Sqlite.Close();
@@ -858,7 +858,7 @@ class Sqlite
                                SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, true);
                                
                                SqlitePreferences.Update ("databaseVersion", "0.61", true); 
-                               Log.WriteLine("Converted DB to 0.61 added RunIntervalType distancesString 
(now we van have interval tests with different distances of tracks). Added MTGUG");
+                               LogB.SQL("Converted DB to 0.61 added RunIntervalType distancesString (now we 
van have interval tests with different distances of tracks). Added MTGUG");
                                
                                conversionRate = 3;
                                Sqlite.Close();
@@ -868,7 +868,7 @@ class Sqlite
                                Sqlite.Open();
                                SqliteJumpType.JumpRjTypeInsert ("RJ(hexagon):1:0:1:18:Reactive Jump on a 
hexagon until three full revolutions are done", true);
                                SqlitePreferences.Update ("databaseVersion", "0.62", true); 
-                               Log.WriteLine("Converted DB to 0.62 added hexagon");
+                               LogB.SQL("Converted DB to 0.62 added hexagon");
                                Sqlite.Close();
                                currentVersion = "0.62";
                        }
@@ -876,7 +876,7 @@ class Sqlite
                                Sqlite.Open();
                                SqlitePreferences.Insert ("versionAvailable", "");
                                SqlitePreferences.Update ("databaseVersion", "0.63", true); 
-                               Log.WriteLine("Converted DB to 0.63 (added 'versionAvailable' to 
preferences)"); 
+                               LogB.SQL("Converted DB to 0.63 (added 'versionAvailable' to preferences)"); 
                                Sqlite.Close();
                                currentVersion = "0.63";
                        }
@@ -892,7 +892,7 @@ class Sqlite
                                SqliteEvent.GraphLinkInsert (Constants.RunTable, "Margaria", "margaria.png", 
true);
                                SqlitePreferences.Update ("databaseVersion", "0.64", true); 
                                
-                               Log.WriteLine("Converted DB to 0.64 (added margaria test)"); 
+                               LogB.SQL("Converted DB to 0.64 (added margaria test)"); 
                                Sqlite.Close();
                                currentVersion = "0.64";
                        }
@@ -905,7 +905,7 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.65", true); 
                                
-                               Log.WriteLine("Converted DB to 0.65 (added Sevaluator on client)"); 
+                               LogB.SQL("Converted DB to 0.65 (added Sevaluator on client)"); 
                                Sqlite.Close();
                                currentVersion = "0.65";
                        }
@@ -916,8 +916,8 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.66", true); 
                                
-                               //Log.WriteLine("Converted DB to 0.66 (added RunAnalysis Reactive jump)"); 
-                               Log.WriteLine("Converted DB to 0.66 (done nothing)"); 
+                               //LogB.SQL("Converted DB to 0.66 (added RunAnalysis Reactive jump)"); 
+                               LogB.SQL("Converted DB to 0.66 (done nothing)"); 
                                Sqlite.Close();
                                currentVersion = "0.66";
                        }
@@ -928,7 +928,7 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.67", true); 
                                
-                               Log.WriteLine("Converted DB to 0.67 (added TakeOff jumps)"); 
+                               LogB.SQL("Converted DB to 0.67 (added TakeOff jumps)"); 
                                Sqlite.Close();
                                currentVersion = "0.67";
                        }
@@ -938,7 +938,7 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.68", true); 
                                
-                               Log.WriteLine("Converted DB to 0.68 (added multiChronopic tests table)"); 
+                               LogB.SQL("Converted DB to 0.68 (added multiChronopic tests table)"); 
                                Sqlite.Close();
                                currentVersion = "0.68";
                        }
@@ -954,7 +954,7 @@ class Sqlite
                                SqliteEvent.GraphLinkInsert (Constants.RunTable, "Gesell-DBT", 
"gesell_dbt.png", true);
                                SqlitePreferences.Update ("databaseVersion", "0.69", true); 
                                
-                               Log.WriteLine("Converted DB to 0.69 (added Gesell-DBT test)"); 
+                               LogB.SQL("Converted DB to 0.69 (added Gesell-DBT test)"); 
                                Sqlite.Close();
                                currentVersion = "0.69";
                        }
@@ -962,7 +962,7 @@ class Sqlite
                                Sqlite.Open();
                                SqlitePreferences.Insert ("showPower", "True"); 
                                SqlitePreferences.Update ("databaseVersion", "0.70", true); 
-                               Log.WriteLine("Converted DB to 0.70 (added showPower)");
+                               LogB.SQL("Converted DB to 0.70 (added showPower)");
                                Sqlite.Close();
                                currentVersion = "0.70";
                        }
@@ -973,7 +973,7 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.71", true); 
                                
-                               Log.WriteLine("Converted DB to 0.71 (created personNotUploadTable on 
client)"); 
+                               LogB.SQL("Converted DB to 0.71 (created personNotUploadTable on client)"); 
                                Sqlite.Close();
                                currentVersion = "0.71";
                        }
@@ -984,7 +984,7 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.72", true); 
                                
-                               Log.WriteLine("Converted DB to 0.72 (dates to YYYY-MM-DD)"); 
+                               LogB.SQL("Converted DB to 0.72 (dates to YYYY-MM-DD)"); 
                                Sqlite.Close();
                                currentVersion = "0.72";
                        }
@@ -995,7 +995,7 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.73", true); 
                                
-                               Log.WriteLine("Converted DB to 0.73 (deleted orphaned persons (in person 
table but not in personSessionWeight table)"); 
+                               LogB.SQL("Converted DB to 0.73 (deleted orphaned persons (in person table but 
not in personSessionWeight table)"); 
                                Sqlite.Close();
                                currentVersion = "0.73";
                        }
@@ -1006,7 +1006,7 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.74", true); 
                                
-                               Log.WriteLine("Converted DB to 0.74 (All DJ converted to DJna)"); 
+                               LogB.SQL("Converted DB to 0.74 (All DJ converted to DJna)"); 
                                Sqlite.Close();
                                currentVersion = "0.74";
                        }
@@ -1024,7 +1024,7 @@ class Sqlite
                                SqlitePreferences.Update ("databaseVersion", "0.75", true); 
                                conversionRate++;
                                
-                               Log.WriteLine("Converted DB to 0.75 (person, and personSessionWeight have 
height and weight as double)"); 
+                               LogB.SQL("Converted DB to 0.75 (person, and personSessionWeight have height 
and weight as double)"); 
                                Sqlite.Close();
                                currentVersion = "0.75";
                        }
@@ -1043,7 +1043,7 @@ class Sqlite
                                SqlitePreferences.Update ("databaseVersion", "0.76", true); 
                                conversionRate++;
                                
-                               Log.WriteLine("Converted DB to 0.76 (jump & jumpRj falls as double)"); 
+                               LogB.SQL("Converted DB to 0.76 (jump & jumpRj falls as double)"); 
                                Sqlite.Close();
                                currentVersion = "0.76";
                        }
@@ -1052,7 +1052,7 @@ class Sqlite
                                
                                convertPersonAndPersonSessionTo77();
                                SqlitePreferences.Update ("databaseVersion", "0.77", true); 
-                               Log.WriteLine("Converted DB to 0.77 (person77, personSession77)"); 
+                               LogB.SQL("Converted DB to 0.77 (person77, personSession77)"); 
                                
                                Sqlite.Close();
                                currentVersion = "0.77";
@@ -1067,7 +1067,7 @@ class Sqlite
                                SqlitePreferences.Insert ("machineID", machineID); 
 
                                SqlitePreferences.Update ("databaseVersion", "0.78", true); 
-                               Log.WriteLine("Converted DB to 0.78 (Added machineID to preferences, 
takeOffWeight has no weight in db conversions since 0.66)"); 
+                               LogB.SQL("Converted DB to 0.78 (Added machineID to preferences, takeOffWeight 
has no weight in db conversions since 0.66)"); 
 
                                Sqlite.Close();
                                currentVersion = "0.78";
@@ -1078,7 +1078,7 @@ class Sqlite
                                SqlitePreferences.Insert ("multimediaStorage", 
Constants.MultimediaStorage.BYSESSION.ToString());
 
                                SqlitePreferences.Update ("databaseVersion", "0.79", true); 
-                               Log.WriteLine("Converted DB to 0.79 (Added multimediaStorage structure id)"); 
+                               LogB.SQL("Converted DB to 0.79 (Added multimediaStorage structure id)"); 
 
                                Sqlite.Close();
                                currentVersion = "0.79";
@@ -1096,7 +1096,7 @@ class Sqlite
                                        conversionRate ++;
                                        convertTables(new SqliteRunInterval(), Constants.RunIntervalTable, 
12, myArray, false);
                                        conversionRate ++;
-                                       Log.WriteLine("Converted DB to 0.80 Added run and runInterval initial 
speed (if not done in 0.56 conversion)"); 
+                                       LogB.SQL("Converted DB to 0.80 Added run and runInterval initial 
speed (if not done in 0.56 conversion)"); 
                                }
 
                                SqlitePreferences.Update ("databaseVersion", "0.80", true); 
@@ -1115,7 +1115,7 @@ class Sqlite
                                Sqlite.dropTable(Constants.TempRunIntervalTable);
                                sqliteRunIntervalObject.createTable(Constants.TempRunIntervalTable);
                                conversionRate ++;
-                               Log.WriteLine("Converted DB to 0.81 Added tempRunInterval initial speed"); 
+                               LogB.SQL("Converted DB to 0.81 Added tempRunInterval initial speed"); 
 
                                SqlitePreferences.Update ("databaseVersion", "0.81", true); 
                                
@@ -1129,7 +1129,7 @@ class Sqlite
                                conversionRate = 1;
                                SqlitePreferences.Insert ("videoOn", "False"); 
                                conversionRate = 2;
-                               Log.WriteLine("Converted DB to 0.82 Added videoOn"); 
+                               LogB.SQL("Converted DB to 0.82 Added videoOn"); 
 
                                SqlitePreferences.Update ("databaseVersion", "0.82", true); 
                                
@@ -1145,7 +1145,7 @@ class Sqlite
                                SqliteEncoder.createTableEncoderExercise();
                                SqliteEncoder.initializeTableEncoderExercise();
                                conversionRate = 2;
-                               Log.WriteLine("Created encoder tables.");
+                               LogB.SQL("Created encoder tables.");
 
                                SqlitePreferences.Update ("databaseVersion", "0.83", true); 
                                Sqlite.Close();
@@ -1164,7 +1164,7 @@ class Sqlite
                                type.DistancesString = "8-4-R3-5";
                                SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, true);
 
-                               Log.WriteLine("Added 1st RSA test.");
+                               LogB.SQL("Added 1st RSA test.");
 
                                SqlitePreferences.Update ("databaseVersion", "0.84", true); 
                                Sqlite.Close();
@@ -1176,13 +1176,13 @@ class Sqlite
 
                                SqlitePreferences.Update ("databaseVersion", "0.85", true); 
                                
-                               Log.WriteLine("Converted DB to 0.85 (added slCMJ jump)"); 
+                               LogB.SQL("Converted DB to 0.85 (added slCMJ jump)"); 
                                Sqlite.Close();
                                currentVersion = "0.85";
                        }
                        if(currentVersion == "0.85") {
                                Sqlite.Open();
-                               Log.WriteLine("Converted DB to 0.86 videoOn: TRUE"); 
+                               LogB.SQL("Converted DB to 0.86 videoOn: TRUE"); 
 
                                SqlitePreferences.Update("videoOn", "True", true);
                                SqlitePreferences.Update ("databaseVersion", "0.86", true); 
@@ -1192,7 +1192,7 @@ class Sqlite
                        }
                        if(currentVersion == "0.86") {
                                Sqlite.Open();
-                               Log.WriteLine("Added run speed start preferences on sqlite"); 
+                               LogB.SQL("Added run speed start preferences on sqlite"); 
 
                                SqlitePreferences.Insert ("runSpeedStartArrival", "True");
                                SqlitePreferences.Insert ("runISpeedStartArrival", "True");
@@ -1209,14 +1209,14 @@ class Sqlite
                                Sqlite.Open();
                                dbcmd.CommandText = "Delete FROM " + Constants.RunIntervalTable +
                                        " WHERE type == 'RSA 8-4-R3-5'";
-                               Log.WriteLine(dbcmd.CommandText.ToString());
+                               LogB.SQL(dbcmd.CommandText.ToString());
                                dbcmd.ExecuteNonQuery();
                                
                                //add know RSAs
                                SqliteRunIntervalType.addRSA();
                                addedRSA = true;
 
-                               Log.WriteLine("Deleted fake RSA test and added known RSA tests.");
+                               LogB.SQL("Deleted fake RSA test and added known RSA tests.");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.88", true); 
                                Sqlite.Close();
@@ -1228,7 +1228,7 @@ class Sqlite
        
                                SqliteEncoder.addEncoderFreeExercise();
                                
-                               Log.WriteLine("Added encoder exercise: Free");
+                               LogB.SQL("Added encoder exercise: Free");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.89", true); 
                                Sqlite.Close();
@@ -1241,7 +1241,7 @@ class Sqlite
                                SqlitePreferences.Insert("encoderPropulsive", "True");
                                SqlitePreferences.Insert("encoderSmoothEccCon", "0.6");
                                SqlitePreferences.Insert("encoderSmoothCon", "0.7");
-                               Log.WriteLine("Preferences added propulsive and encoder smooth");
+                               LogB.SQL("Preferences added propulsive and encoder smooth");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.90", true); 
                                Sqlite.Close();
@@ -1252,7 +1252,7 @@ class Sqlite
                                Sqlite.Open();
                                
                                SqliteEncoder.UpdateExercise(true, "Squat", "Squat", 100, "weight bar", "", 
"");        
-                               Log.WriteLine("Encoder Squat 75% -> 100%");
+                               LogB.SQL("Encoder Squat 75% -> 100%");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.91", true); 
                                Sqlite.Close();
@@ -1263,7 +1263,7 @@ class Sqlite
                                Sqlite.Open();
                                
                                SqlitePreferences.Insert("videoDevice", "0");
-                               Log.WriteLine("Added videoDevice to preferences");
+                               LogB.SQL("Added videoDevice to preferences");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.92", true); 
                                Sqlite.Close();
@@ -1275,7 +1275,7 @@ class Sqlite
                                
                                SqliteEncoder.UpdateExercise(true, "Bench press", "Bench press", 0, "weight 
bar", "","0.185");
                                SqliteEncoder.UpdateExercise(true, "Squat", "Squat", 100, "weight bar", 
"","0.31");
-                               Log.WriteLine("Added speed1RM on encoder exercise");
+                               LogB.SQL("Added speed1RM on encoder exercise");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.93", true); 
                                Sqlite.Close();
@@ -1286,7 +1286,7 @@ class Sqlite
                                Sqlite.Open();
                                
                                SqliteEncoder.createTable1RM();
-                               Log.WriteLine("Added encoder1RM table");
+                               LogB.SQL("Added encoder1RM table");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.94", true); 
                                Sqlite.Close();
@@ -1298,7 +1298,7 @@ class Sqlite
                                
                                SqlitePreferences.Insert ("encoder1RMMethod", 
                                                Constants.Encoder1RMMethod.WEIGHTED2.ToString());
-                               Log.WriteLine("Added encoder1RMMethod");
+                               LogB.SQL("Added encoder1RMMethod");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.95", true); 
                                Sqlite.Close();
@@ -1315,7 +1315,7 @@ class Sqlite
                                Update(true, Constants.EncoderTable, "future3", "1", 
Constants.EncoderConfigurationNames.LINEARINVERTED.ToString(),
                                                "signalOrCurve", "signal");
 
-                               Log.WriteLine("Encoder signal future3 three modes");
+                               LogB.SQL("Encoder signal future3 three modes");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.96", true); 
                                Sqlite.Close();
@@ -1326,7 +1326,7 @@ class Sqlite
                                Sqlite.Open();
                                
                                SqlitePreferences.Insert ("inertialmomentum", "0.01");
-                               Log.WriteLine("Added inertialmomentum in preferences");
+                               LogB.SQL("Added inertialmomentum in preferences");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.97", true); 
                                Sqlite.Close();
@@ -1345,7 +1345,7 @@ class Sqlite
                                Update(true, Constants.EncoderTable, "laterality", "left", "L", "", "");
                                Update(true, Constants.EncoderTable, "laterality", "Left", "L", "", "");
                                Update(true, Constants.EncoderTable, "laterality", Catalog.GetString("Left"), 
"L", "", "");
-                               Log.WriteLine("Fixed encoder laterality");
+                               LogB.SQL("Fixed encoder laterality");
                                
                                SqlitePreferences.Update ("databaseVersion", "0.98", true); 
                                Sqlite.Close();
@@ -1384,13 +1384,13 @@ class Sqlite
                                                Util.ConvertToPoint(es.smooth) + ", '" + es.description + "', 
'" +
                                                es.future1 + "', '" + es.future2 + "', 'LINEAR', " + 
//status, videoURL, mode
                                                "0, 0, '', '', '')"; //inertiaMomentum, diameter, future1, 2, 
3
-                                       Log.WriteLine(dbcmd.CommandText.ToString());
+                                       LogB.SQL(dbcmd.CommandText.ToString());
                                        dbcmd.ExecuteNonQuery();
                                        count ++;
                                }       
 
                                conversionRate = count;
-                               Log.WriteLine("Encoder table improved");
+                               LogB.SQL("Encoder table improved");
                                SqlitePreferences.Update ("databaseVersion", "0.99", true); 
                                Sqlite.Close();
 
@@ -1403,7 +1403,7 @@ class Sqlite
                                SqliteEncoder.addEncoderJumpExercise();
                                SqliteEncoder.addEncoderInclinatedExercises();
 
-                               Log.WriteLine("Added Free and inclinatedExercises");
+                               LogB.SQL("Added Free and inclinatedExercises");
                                SqlitePreferences.Update ("databaseVersion", "1.00", true); 
                                Sqlite.Close();
 
@@ -1414,7 +1414,7 @@ class Sqlite
                        
                                SqlitePreferences.Insert ("CSVExportDecimalSeparator", 
Util.GetDecimalSeparatorFromLocale());
 
-                               Log.WriteLine("Added export to CSV configuration on preferences");
+                               LogB.SQL("Added export to CSV configuration on preferences");
                                SqlitePreferences.Update ("databaseVersion", "1.01", true); 
                                Sqlite.Close();
 
@@ -1428,7 +1428,7 @@ class Sqlite
                                type = new RunType("Agility-3L3R");
                                SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, true);
 
-                               Log.WriteLine("Added Agility Tests: Agility-T-Test, Agility-3l3R");
+                               LogB.SQL("Added Agility Tests: Agility-T-Test, Agility-3l3R");
                                SqlitePreferences.Update ("databaseVersion", "1.02", true); 
                                Sqlite.Close();
 
@@ -1440,7 +1440,7 @@ class Sqlite
                                DeleteFromName(true, Constants.EncoderExerciseTable, "Inclinated plane 
Custom");
                                SqliteEncoder.removeEncoderExerciseAngles();
 
-                               Log.WriteLine("Updated encoder exercise, angle is now on encoder 
configuration");
+                               LogB.SQL("Updated encoder exercise, angle is now on encoder configuration");
                                SqlitePreferences.Update ("databaseVersion", "1.03", true); 
                                Sqlite.Close();
 
@@ -1481,13 +1481,13 @@ class Sqlite
                                                es.status + "', '" + es.videoURL + "', '" + 
                                                econf.ToString(":", true) + "', '" + //in this conversion put 
this as default for all SQL rows
                                                es.future1 + "', '" + es.future2 + "', '" + es.future3 + "')";
-                                       Log.WriteLine(dbcmd.CommandText.ToString());
+                                       LogB.SQL(dbcmd.CommandText.ToString());
                                        dbcmd.ExecuteNonQuery();
                                        count ++;
                                }       
 
                                conversionRate = count;
-                               Log.WriteLine("Encoder table improved");
+                               LogB.SQL("Encoder table improved");
                                SqlitePreferences.Update ("databaseVersion", "1.04", true); 
                                Sqlite.Close();
 
@@ -1499,10 +1499,10 @@ class Sqlite
                                dbcmd.CommandText = "DELETE FROM " + Constants.EncoderTable + 
                                        " WHERE encoderConfiguration LIKE \"%INERTIAL%\" AND " +
                                        " signalOrCurve == \"curve\"";
-                               Log.WriteLine(dbcmd.CommandText.ToString());
+                               LogB.SQL(dbcmd.CommandText.ToString());
                                dbcmd.ExecuteNonQuery();
 
-                               Log.WriteLine("Removed inertial curves, because sign was not checked on 1.04 
when saving curves");
+                               LogB.SQL("Removed inertial curves, because sign was not checked on 1.04 when 
saving curves");
                                SqlitePreferences.Update ("databaseVersion", "1.05", true); 
                                Sqlite.Close();
 
@@ -1571,7 +1571,7 @@ class Sqlite
 
                                conversionSubRate ++;
                                conversionRate ++;
-                               Log.WriteLine("Curves are now linked to signals");
+                               LogB.SQL("Curves are now linked to signals");
                                SqlitePreferences.Update ("databaseVersion", "1.06", true); 
                                
                                Sqlite.Close();
@@ -1583,7 +1583,7 @@ class Sqlite
                                Update(true, Constants.GraphLinkTable, "graphFileName", "jump_dj.png", 
"jump_dj_a.png",
                                                "eventName", "DJa");
                                
-                               Log.WriteLine("Added jump_dj_a.png");
+                               LogB.SQL("Added jump_dj_a.png");
                                SqlitePreferences.Update ("databaseVersion", "1.07", true); 
                                Sqlite.Close();
 
@@ -1592,7 +1592,7 @@ class Sqlite
                        if(currentVersion == "1.07") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Added translate statistics graph option to preferences");
+                               LogB.SQL("Added translate statistics graph option to preferences");
                                
                                SqlitePreferences.Insert ("RGraphsTranslate", "True"); 
                                SqlitePreferences.Update ("databaseVersion", "1.08", true); 
@@ -1603,7 +1603,7 @@ class Sqlite
                        if(currentVersion == "1.08") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Added option on preferences to useHeightsOnJumpIndexes 
(default) or not");
+                               LogB.SQL("Added option on preferences to useHeightsOnJumpIndexes (default) or 
not");
                                
                                SqlitePreferences.Insert ("useHeightsOnJumpIndexes", "True"); 
                                SqlitePreferences.Update ("databaseVersion", "1.09", true); 
@@ -1614,7 +1614,7 @@ class Sqlite
                        if(currentVersion == "1.09") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Added RSA RAST on runType");
+                               LogB.SQL("Added RSA RAST on runType");
 
                                /*
                                 * addRSA() contains RAST since 1.10
@@ -1644,7 +1644,7 @@ class Sqlite
                        if(currentVersion == "1.10") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Added option on autosave curves on capture 
(all/bestmeanpower/none)");
+                               LogB.SQL("Added option on autosave curves on capture 
(all/bestmeanpower/none)");
                                
                                SqlitePreferences.Insert ("encoderAutoSaveCurve", 
Constants.EncoderAutoSaveCurve.BESTMEANPOWER.ToString()); 
                                SqlitePreferences.Update ("databaseVersion", "1.11", true); 
@@ -1655,7 +1655,7 @@ class Sqlite
                        if(currentVersion == "1.11") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("URLs from absolute to relative)");
+                               LogB.SQL("URLs from absolute to relative)");
                                
                                SqliteOldConvert.ConvertAbsolutePathsToRelative(); 
                                SqlitePreferences.Update ("databaseVersion", "1.12", true); 
@@ -1666,7 +1666,7 @@ class Sqlite
                        if(currentVersion == "1.12") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Added ExecuteAuto table");
+                               LogB.SQL("Added ExecuteAuto table");
                                
                                SqliteExecuteAuto.createTableExecuteAuto();
                                SqlitePreferences.Update ("databaseVersion", "1.13", true); 
@@ -1677,7 +1677,7 @@ class Sqlite
                        if(currentVersion == "1.13") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("slCMJ -> slCMJleft, slCMJright");
+                               LogB.SQL("slCMJ -> slCMJleft, slCMJright");
 
                                SqliteOldConvert.slCMJDivide();
                                SqlitePreferences.Update ("databaseVersion", "1.14", true); 
@@ -1688,7 +1688,7 @@ class Sqlite
                        if(currentVersion == "1.14") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("added Chronojump profile and bilateral profile");
+                               LogB.SQL("added Chronojump profile and bilateral profile");
 
                                SqliteExecuteAuto.addChronojumpProfileAndBilateral();
                                SqlitePreferences.Update ("databaseVersion", "1.15", true); 
@@ -1699,7 +1699,7 @@ class Sqlite
                        if(currentVersion == "1.15") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Cyprus moved to Europe");
+                               LogB.SQL("Cyprus moved to Europe");
 
                                Update(true, Constants.CountryTable, "continent", "Asia", "Europe", "code", 
"CYP"); 
                                SqlitePreferences.Update ("databaseVersion", "1.16", true); 
@@ -1710,7 +1710,7 @@ class Sqlite
                        if(currentVersion == "1.16") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Deleting Max jump");
+                               LogB.SQL("Deleting Max jump");
 
                                Update(true, Constants.JumpTable, "type", "Max", "Free", "", ""); 
                                DeleteFromName(true, Constants.JumpTypeTable, "Max");
@@ -1722,7 +1722,7 @@ class Sqlite
                        if(currentVersion == "1.17") {
                                Sqlite.Open();
                        
-                               Log.WriteLine("Deleted Negative runInterval runs (bug from last version)");
+                               LogB.SQL("Deleted Negative runInterval runs (bug from last version)");
 
                                SqliteOldConvert.deleteNegativeRuns();
                                SqlitePreferences.Update ("databaseVersion", "1.18", true); 
@@ -1741,7 +1741,7 @@ class Sqlite
 
        public static bool ChangeDjToDJna() {
                string v = SqlitePreferences.Select("databaseVersion");
-               Log.WriteLine(Convert.ToDouble(Util.ChangeDecimalSeparator(v)).ToString());
+               LogB.SQL(Convert.ToDouble(Util.ChangeDecimalSeparator(v)).ToString());
                if(Convert.ToDouble(Util.ChangeDecimalSeparator(v)) < 
Convert.ToDouble(Util.ChangeDecimalSeparator("0.74")))
                        return true;
                return false;
@@ -1758,7 +1758,7 @@ class Sqlite
                                SqlitePreferences.Insert ("chronopicPort", 
Constants.ChronopicDefaultPortLinux);
                        Sqlite.Close();
                        
-                       Log.WriteLine("Added Chronopic port");
+                       LogB.SQL("Added Chronopic port");
                }
        }
        
@@ -1965,7 +1965,7 @@ class Sqlite
 
                dbcmd.CommandText = "SELECT uniqueID FROM " + tableName + 
                        " WHERE LOWER(name) == LOWER('" + findName + "')" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -1976,7 +1976,7 @@ class Sqlite
                if (reader.Read()) {
                        exists = true;
                }
-               Log.WriteLine(string.Format("name exists = {0}", exists.ToString()));
+               LogB.SQL(string.Format("name exists = {0}", exists.ToString()));
 
                reader.Close();
                if(!dbconOpened)
@@ -2058,7 +2058,7 @@ class Sqlite
                
                Sqlite.Open();
                dbcmd.CommandText = "SELECT MAX(uniqueID) FROM " + tableName;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                //SqliteDataReader reader;
                SqliteDataReader reader;
@@ -2072,7 +2072,7 @@ class Sqlite
                                exists = Convert.ToInt32(reader[0]);
                        } catch { exists = 0; }
                }
-               Log.WriteLine(string.Format("exists = {0}", exists.ToString()));
+               LogB.SQL(string.Format("exists = {0}", exists.ToString()));
                reader.Close();
                Sqlite.Close();
 
@@ -2086,7 +2086,7 @@ class Sqlite
                Sqlite.Open();
                //dbcmd.CommandText = "Delete FROM tempJumpRj";
                dbcmd.CommandText = "Delete FROM " + tableName;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -2184,7 +2184,7 @@ class Sqlite
                        DateTime dt = UtilDate.FromSql(id_date[1]);
                        dbcmd.CommandText = "UPDATE person set dateBorn = '" + UtilDate.ToSql(dt) +
                                "' WHERE uniqueID = " + id_date[0];
-                       Log.WriteLine(dbcmd.CommandText.ToString());
+                       LogB.SQL(dbcmd.CommandText.ToString());
                        dbcmd.ExecuteNonQuery();
                        conversionSubRate ++;
                }
@@ -2212,7 +2212,7 @@ class Sqlite
                        DateTime dt = UtilDate.FromSql(id_date[1]);
                        dbcmd.CommandText = "UPDATE session set date = '" + UtilDate.ToSql(dt) +
                                "' WHERE uniqueID = " + id_date[0];
-                       Log.WriteLine(dbcmd.CommandText.ToString());
+                       LogB.SQL(dbcmd.CommandText.ToString());
                        dbcmd.ExecuteNonQuery();
                        conversionSubRate ++;
                }
@@ -2240,7 +2240,7 @@ class Sqlite
                        DateTime dt = UtilDate.FromSql(id_date[1]);
                        dbcmd.CommandText = "UPDATE SEvaluator set dateBorn = '" + UtilDate.ToSql(dt) +
                                "' WHERE uniqueID = " + id_date[0];
-                       Log.WriteLine(dbcmd.CommandText.ToString());
+                       LogB.SQL(dbcmd.CommandText.ToString());
                        dbcmd.ExecuteNonQuery();
                        conversionSubRate ++;
                }
@@ -2251,7 +2251,7 @@ class Sqlite
        protected internal static void deleteOrphanedPersons()
        {
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonTable;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -2275,7 +2275,7 @@ class Sqlite
        protected internal static void deleteOrphanedPersonsOld()
        {
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonOldTable;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -2304,7 +2304,7 @@ class Sqlite
                                if(!Exists(false, Constants.JumpTypeTable, name)) {
                                        success = true;
                                        dbcmd.CommandText = "UPDATE jump SET type = '" + name + "' WHERE type 
== 'DJa'";
-                                       Log.WriteLine(dbcmd.CommandText.ToString());
+                                       LogB.SQL(dbcmd.CommandText.ToString());
                                        dbcmd.ExecuteNonQuery();
                                }
                                if(success) 
@@ -2320,7 +2320,7 @@ class Sqlite
                                if(!Exists(false, Constants.JumpTypeTable, name)) {
                                        success = true;
                                        dbcmd.CommandText = "UPDATE jump SET type = '" + name + "' WHERE type 
== 'DJna'";
-                                       Log.WriteLine(dbcmd.CommandText.ToString());
+                                       LogB.SQL(dbcmd.CommandText.ToString());
                                        dbcmd.ExecuteNonQuery();
                                }
                                if(success) 
@@ -2337,12 +2337,12 @@ class Sqlite
                
                //add auto-converted on description
                dbcmd.CommandText = "UPDATE jump SET description = description || ' Auto-converted from DJ' 
WHERE type == 'DJ'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //conversion
                dbcmd.CommandText = "UPDATE jump SET type = 'DJna' WHERE type == 'DJ'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //delete DJ
@@ -2372,7 +2372,7 @@ class Sqlite
                ArrayList myArray = new ArrayList(2);
                dbcmd.CommandText = "SELECT * " + 
                        "FROM " + tableName + " ORDER BY uniqueID"; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
 
@@ -2435,7 +2435,7 @@ class Sqlite
                }
                reader.Close();
 
-Console.WriteLine("1" + tableName);
+LogB.SQL("1" + tableName);
 
                conversionSubRateTotal = myArray.Count * 2;
 
@@ -2466,16 +2466,16 @@ Console.WriteLine("1" + tableName);
                        }
                }
                
-Console.WriteLine("2" + tableName);
+LogB.SQL("2" + tableName);
                //3rd drop desired table
                Sqlite.dropTable(tableName);
 
-Console.WriteLine("3" + tableName);
+LogB.SQL("3" + tableName);
                //4d create desired table (now with new columns)
                sqliteObject.createTable(tableName);
 
 
-Console.WriteLine("4" + tableName);
+LogB.SQL("4" + tableName);
 
                //5th insert data in desired table
                if(tableName == Constants.PersonOldTable) {     
@@ -2505,7 +2505,7 @@ Console.WriteLine("4" + tableName);
                        }
                }
 
-Console.WriteLine("5" + tableName);
+LogB.SQL("5" + tableName);
                //6th drop temp table
                Sqlite.dropTable(Constants.ConvertTempTable);
        }
@@ -2538,7 +2538,7 @@ Console.WriteLine("5" + tableName);
                        "FROM " + tableName + " ORDER BY uniqueID"; 
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
 
                while(reader.Read()) {
                        string [] myReaderStr = new String[columns];
@@ -2604,7 +2604,7 @@ Console.WriteLine("5" + tableName);
        {
                //select personID and jump type 'SJ' mean
                dbcmd.CommandText = selectStr;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader = dbcmd.ExecuteReader();
@@ -2613,7 +2613,7 @@ Console.WriteLine("5" + tableName);
                while(reader.Read()) {
                        IDName idname = new IDName( Convert.ToInt32(reader[0].ToString()),
                                                reader[1].ToString());
-                       Log.WriteLine(idname.ToString());
+                       LogB.SQL(idname.ToString());
                        
                        list.Add(new IDName( Convert.ToInt32(reader[0].ToString()),
                                                reader[1].ToString() ));
@@ -2626,7 +2626,7 @@ Console.WriteLine("5" + tableName);
        {
                //select personID and jump type 'SJ' mean
                dbcmd.CommandText = selectStr;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader = dbcmd.ExecuteReader();
@@ -2649,7 +2649,7 @@ Console.WriteLine("5" + tableName);
                        Sqlite.Open();
 
                dbcmd.CommandText = "SELECT MAX(" + column + ") FROM " + tableName ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -2671,7 +2671,7 @@ Console.WriteLine("5" + tableName);
                        Sqlite.Open();
 
                dbcmd.CommandText = "SELECT COUNT(*) FROM " + tableName ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -2692,7 +2692,7 @@ Console.WriteLine("5" + tableName);
 
                dbcmd.CommandText = "SELECT COUNT(*) FROM " + tableName +
                        " WHERE " + condition + " " + operand + " " + myValue;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -2722,7 +2722,7 @@ Console.WriteLine("5" + tableName);
                        " WHERE " + columnName + " == '" + searchValue + "'" + 
                        andStr
                        ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if( ! dbconOpened)
@@ -2736,7 +2736,7 @@ Console.WriteLine("5" + tableName);
 
                dbcmd.CommandText = "Delete FROM " + tableName +
                        " WHERE uniqueID == " + uniqueID.ToString();
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if( ! dbconOpened)
@@ -2750,7 +2750,7 @@ Console.WriteLine("5" + tableName);
 
                dbcmd.CommandText = "Delete FROM " + tableName +
                        " WHERE " + fieldName + " == " + id;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if( ! dbconOpened)
@@ -2765,7 +2765,7 @@ Console.WriteLine("5" + tableName);
 
                dbcmd.CommandText = "Delete FROM " + tableName +
                        " WHERE name == '" + name + "'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if( ! dbconOpened)
@@ -2779,7 +2779,7 @@ Console.WriteLine("5" + tableName);
 
                dbcmd.CommandText = "Delete FROM " + tableName +
                        " WHERE " + colName + " == " + id;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if( ! dbconOpened)
diff --git a/src/sqlite/multiChronopic.cs b/src/sqlite/multiChronopic.cs
index 874f648..aead9fb 100644
--- a/src/sqlite/multiChronopic.cs
+++ b/src/sqlite/multiChronopic.cs
@@ -97,7 +97,7 @@ class SqliteMultiChronopic : Sqlite
                        cp4InStr + "', '" + cp4OutStr + "', '" +
                        vars + "', '" +
                        description + "', " + simulated + ")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                //int myLast = dbcon.LastInsertRowId;
@@ -129,7 +129,7 @@ class SqliteMultiChronopic : Sqlite
                        filterPersonString +
                        " ORDER BY upper(" + tp + ".name), multiChronopic.uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -186,7 +186,7 @@ class SqliteMultiChronopic : Sqlite
 
                dbcmd.CommandText = "SELECT * FROM " + Constants.MultiChronopicTable + " WHERE uniqueID == " 
+ uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
 
                dbcmd.ExecuteNonQuery();
 
@@ -209,7 +209,7 @@ class SqliteMultiChronopic : Sqlite
 
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.MultiChronopicTable + 
                        " WHERE (cp3InStr != \"\" OR cp3OutStr != \"\") AND sessionID == " + sessionID;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -220,7 +220,7 @@ class SqliteMultiChronopic : Sqlite
 
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.MultiChronopicTable + 
                        " WHERE (cp4InStr != \"\" OR cp4OutStr != \"\") AND sessionID == " + sessionID;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                if (reader.Read()) {
@@ -239,7 +239,7 @@ class SqliteMultiChronopic : Sqlite
                        ", vars = '" + vars +           //vars is distance on runAnalysis
                        "', description = '" + description +
                        "' WHERE uniqueID == " + eventID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
diff --git a/src/sqlite/oldConvert.cs b/src/sqlite/oldConvert.cs
index 4e57d47..8b769f9 100644
--- a/src/sqlite/oldConvert.cs
+++ b/src/sqlite/oldConvert.cs
@@ -50,7 +50,7 @@ class SqliteOldConvert : Sqlite
                dbcmd.CommandText = "UPDATE " + table + " SET " + column + " = replace( " + column + ", '" + 
parentDir + "', '' ) " + 
                        "WHERE " + column + " LIKE '" + parentDir + "%'";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
        }       
@@ -68,19 +68,19 @@ class SqliteOldConvert : Sqlite
 
                //changes on jump table
                dbcmd.CommandText = "UPDATE " + Constants.JumpTable + " SET type = 'slCMJleft' WHERE 
description LIKE '%Left%'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                dbcmd.CommandText = "UPDATE " + Constants.JumpTable + " SET type = 'slCMJright' WHERE 
description LIKE '%Right%'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                dbcmd.CommandText = "UPDATE " + Constants.JumpTable + " SET description=replace(description, 
' Left', '')";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                dbcmd.CommandText = "UPDATE " + Constants.JumpTable + " SET description=replace(description, 
' Right', '')";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
 
@@ -132,7 +132,7 @@ class SqliteOldConvert : Sqlite
                                onlyActiveString +
                        " ORDER BY substr(filename,-23,19)"; //this contains the date of capture signal
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -279,7 +279,7 @@ class SqliteOldConvert : Sqlite
                                onlyActiveString +
                        " ORDER BY substr(filename,-23,19)"; //this contains the date of capture signal
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -322,7 +322,7 @@ class SqliteOldConvert : Sqlite
        {
                dbcmd.CommandText = "Delete FROM " + Constants.RunIntervalTable +
                        " WHERE timeTotal < 0";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
 }
diff --git a/src/sqlite/person.cs b/src/sqlite/person.cs
index f640602..7c8d860 100644
--- a/src/sqlite/person.cs
+++ b/src/sqlite/person.cs
@@ -55,7 +55,7 @@ class SqlitePerson : Sqlite
        public static int Insert(bool dbconOpened, string uniqueID, string name, string sex, DateTime 
dateBorn, 
                        int race, int countryID, string description, int serverUniqueID)
        {
-               Log.WriteLine("going to insert");
+               LogB.SQL("going to insert");
                if(! dbconOpened)
                        Sqlite.Open();
 
@@ -71,7 +71,7 @@ class SqlitePerson : Sqlite
                        race + ", " + countryID + ", '" + description + "', '', '', " + serverUniqueID + ")";
                
                dbcmd.CommandText = myString;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = -10000; //dbcon.LastInsertRowId;
@@ -93,7 +93,7 @@ class SqlitePerson : Sqlite
 
                dbcmd.CommandText = "SELECT * FROM " + Constants.PersonTable + " WHERE uniqueID == " + 
uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -125,7 +125,7 @@ class SqlitePerson : Sqlite
 
                dbcmd.CommandText = "SELECT " + attribute + " FROM " + Constants.PersonTable + " WHERE 
uniqueID == " + uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -219,7 +219,7 @@ class SqlitePerson : Sqlite
                                " AND " + tp + ".uniqueID == " + tps + ".personID " + 
                                " ORDER BY " + sortedBy;
                }
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader2;
                reader2 = dbcmd.ExecuteReader();
@@ -284,7 +284,7 @@ finishForeach:
                        " FROM " + tps + ", session " + 
                        " WHERE personID = " + personID + " AND session.uniqueID == " + tps + ".sessionID " +
                        " ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -299,7 +299,7 @@ finishForeach:
                //jumps
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM jump WHERE personID = " + personID +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -310,7 +310,7 @@ finishForeach:
                //jumpsRj
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM jumpRj WHERE personID = " + personID +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -321,7 +321,7 @@ finishForeach:
                //runs
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM run WHERE personID = " + personID +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -332,7 +332,7 @@ finishForeach:
                //runsInterval
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM runInterval WHERE personID = " + 
personID +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -343,7 +343,7 @@ finishForeach:
                //reaction time
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM reactiontime WHERE personID = " + 
personID +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -354,7 +354,7 @@ finishForeach:
                //pulses
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM pulse WHERE personID = " + personID +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -365,7 +365,7 @@ finishForeach:
                //MC
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM multiChronopic WHERE personID = " + 
personID +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -378,7 +378,7 @@ finishForeach:
                       " WHERE personID == " + personID +
                       " AND signalOrCurve == 'signal' " +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -391,7 +391,7 @@ finishForeach:
                       " WHERE personID == " + personID +
                       " AND signalOrCurve == 'curve' " +
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                reader = dbcmd.ExecuteReader();
                while(reader.Read()) {
@@ -534,7 +534,7 @@ finishForeach:
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonTable +
                        " WHERE LOWER(" + Constants.PersonTable + ".name) == LOWER('" + personName + "')" +
                        " AND uniqueID != " + uniqueID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -544,9 +544,9 @@ finishForeach:
                
                if (reader.Read()) {
                        exists = true;
-                       //Log.WriteLine("valor {0}", reader[0].ToString());
+                       //LogB.SQL("valor {0}", reader[0].ToString());
                }
-               //Log.WriteLine("exists = {0}", exists.ToString());
+               //LogB.SQL("exists = {0}", exists.ToString());
 
                reader.Close();
                Sqlite.Close();
@@ -566,7 +566,7 @@ finishForeach:
                        ", description = '" + myPerson.Description +
                        "', serverUniqueID = " + myPerson.ServerUniqueID +
                        " WHERE uniqueID == " + myPerson.UniqueID;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
diff --git a/src/sqlite/personSession.cs b/src/sqlite/personSession.cs
index 8bf7baa..65eeef5 100644
--- a/src/sqlite/personSession.cs
+++ b/src/sqlite/personSession.cs
@@ -73,7 +73,7 @@ class SqlitePersonSession : Sqlite
                        Util.ConvertToPoint(height) + ", " + Util.ConvertToPoint(weight) + ", " +
                        sportID + ", " + speciallityID + ", " + practice + ", '" + 
                        comments + "', '', '')"; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -98,7 +98,7 @@ class SqlitePersonSession : Sqlite
                        " WHERE personID == " + personID + 
                        " AND sessionID == " + sessionID;
                
-               //Log.WriteLine(dbcmd.CommandText.ToString());
+               //LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -125,7 +125,7 @@ class SqlitePersonSession : Sqlite
                        " WHERE personID == " + personID + 
                        "ORDER BY sessionID DESC LIMIT 1";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -153,7 +153,7 @@ class SqlitePersonSession : Sqlite
                        ", practice = " + ps.Practice + 
                        ", comments = '" + ps.Comments + 
                        "' WHERE uniqueID == " + ps.UniqueID;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -167,7 +167,7 @@ class SqlitePersonSession : Sqlite
                        " WHERE personID = " + personID +
                        " AND sessionID = " + sessionID
                        ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -178,7 +178,7 @@ class SqlitePersonSession : Sqlite
                dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionTable +
                        " WHERE personID == " + myPersonID + 
                        " AND sessionID == " + mySessionID ; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -213,7 +213,7 @@ class SqlitePersonSession : Sqlite
                        " WHERE personID == " + personID + 
                        sessionIDString;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -252,7 +252,7 @@ class SqlitePersonSession : Sqlite
                        " WHERE " + tps + ".sessionID == " + sessionID + 
                        " AND " + tp + ".uniqueID == " + tps + ".personID " + 
                        " ORDER BY upper(" + tp + ".name)";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -293,7 +293,7 @@ class SqlitePersonSession : Sqlite
                        " AND " + tp + ".sportID == sport.uniqueID " + 
                        " AND " + tp + ".speciallityID == speciallity.uniqueID " + 
                        " ORDER BY upper(" + tp + ".name)";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -468,7 +468,7 @@ class SqlitePersonSession : Sqlite
 
                dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionTable + 
                        " WHERE personID == " + personID;
-               //Log.WriteLine(dbcmd.CommandText.ToString());
+               //LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -479,7 +479,7 @@ class SqlitePersonSession : Sqlite
                if (reader.Read()) {
                        exists = true;
                }
-               //Log.WriteLine(string.Format("personID exists = {0}", exists.ToString()));
+               //LogB.SQL(string.Format("personID exists = {0}", exists.ToString()));
 
                reader.Close();
                
@@ -497,7 +497,7 @@ class SqlitePersonSessionTransaction : Sqlite
 {
        public SqlitePersonSessionTransaction(List <Person> persons, List <PersonSession> personSessions) 
        {
-               Log.WriteLine("Starting transaction");
+               LogB.SQL("Starting transaction");
                Sqlite.Open();
 
                using(SqliteTransaction tr = dbcon.BeginTransaction())
@@ -511,7 +511,7 @@ class SqlitePersonSessionTransaction : Sqlite
                                                "INSERT INTO " + Constants.PersonTable +
                                                " (uniqueID, name, sex, dateBorn, race, countryID, 
description, future1, future2, serverUniqueID) " + 
                                                " VALUES (" + p.ToSQLInsertString() + ")";
-                                       Log.WriteLine(dbcmdTr.CommandText.ToString());
+                                       LogB.SQL(dbcmdTr.CommandText.ToString());
                                        dbcmdTr.ExecuteNonQuery();
                                }
                                foreach(PersonSession ps in personSessions) {
@@ -520,7 +520,7 @@ class SqlitePersonSessionTransaction : Sqlite
                                                "(uniqueID, personID, sessionID, height, weight, " + 
                                                "sportID, speciallityID, practice, comments, future1, 
future2)" + 
                                                " VALUES (" + ps.ToSQLInsertString() + ")";
-                                       Log.WriteLine(dbcmdTr.CommandText.ToString());
+                                       LogB.SQL(dbcmdTr.CommandText.ToString());
                                        dbcmdTr.ExecuteNonQuery();
                                }
                        }
@@ -528,6 +528,6 @@ class SqlitePersonSessionTransaction : Sqlite
                }
 
                Sqlite.Close();
-               Log.WriteLine("Ended transaction");
+               LogB.SQL("Ended transaction");
        }
 }
diff --git a/src/sqlite/personSessionNotUpload.cs b/src/sqlite/personSessionNotUpload.cs
index 762bc08..a6a2cf4 100644
--- a/src/sqlite/personSessionNotUpload.cs
+++ b/src/sqlite/personSessionNotUpload.cs
@@ -49,7 +49,7 @@ class SqlitePersonSessionNotUpload : Sqlite
                Sqlite.Open();
                dbcmd.CommandText = "SELECT personID FROM " + Constants.PersonNotUploadTable +
                        " WHERE sessionID == " + sessionID;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -70,7 +70,7 @@ class SqlitePersonSessionNotUpload : Sqlite
                dbcmd.CommandText = "INSERT INTO " + Constants.PersonNotUploadTable +  
                        " (personID, sessionID)" +
                        " VALUES (" + personID + ", " + sessionID +")";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                Sqlite.Close();
@@ -81,7 +81,7 @@ class SqlitePersonSessionNotUpload : Sqlite
                 Sqlite.Open();
                 dbcmd.CommandText = "Delete FROM " + Constants.PersonNotUploadTable +
                         " WHERE personID == " + personID + " AND sessionID == " + sessionID;
-                Log.WriteLine(dbcmd.CommandText.ToString());
+                LogB.SQL(dbcmd.CommandText.ToString());
                 dbcmd.ExecuteNonQuery();
                 Sqlite.Close();
         }
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index ce10aec..929fff7 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -101,7 +101,7 @@ class SqlitePreferences : Sqlite
                dbcmd.CommandText = "UPDATE " + Constants.PreferencesTable +
                        " SET value = '" + myValue + 
                        "' WHERE name == '" + myName + "'" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                if(! dbconOpened)
@@ -113,7 +113,7 @@ class SqlitePreferences : Sqlite
                Sqlite.Open();
                dbcmd.CommandText = "SELECT value FROM " + Constants.PreferencesTable + 
                        " WHERE name == '" + myName + "'" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                //SqliteDataReader reader;
@@ -135,7 +135,7 @@ class SqlitePreferences : Sqlite
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * FROM " + Constants.PreferencesTable; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
diff --git a/src/sqlite/pulse.cs b/src/sqlite/pulse.cs
index ee2838f..6fcba3b 100644
--- a/src/sqlite/pulse.cs
+++ b/src/sqlite/pulse.cs
@@ -70,7 +70,7 @@ class SqlitePulse : Sqlite
                                " VALUES (" + uniqueID + ", " + personID + ", " + sessionID + ", '" + type + 
"', "
                                + Util.ConvertToPoint(fixedPulse) + ", " + totalPulsesNum + ", '"
                                + timeString + "', '" + description + "', " + simulated + ")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -103,7 +103,7 @@ class SqlitePulse : Sqlite
                        filterPersonString +
                        " ORDER BY upper(" + tp + ".name), pulse.uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -148,7 +148,7 @@ class SqlitePulse : Sqlite
 
                dbcmd.CommandText = "SELECT * FROM " + Constants.PulseTable + " WHERE uniqueID == " + 
uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -170,7 +170,7 @@ class SqlitePulse : Sqlite
                        " SET personID = " + personID + 
                        ", description = '" + description +
                        "' WHERE uniqueID == " + pulseID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
diff --git a/src/sqlite/pulseType.cs b/src/sqlite/pulseType.cs
index b0d7549..7412e7e 100644
--- a/src/sqlite/pulseType.cs
+++ b/src/sqlite/pulseType.cs
@@ -73,7 +73,7 @@ class SqlitePulseType : Sqlite
                                " VALUES (NULL, '"
                                + myStr[0] + "', " + myStr[1] + ", " +  //name, fixedPulse
                                myStr[2] + ", '" + myStr[3] + "')" ;    //totalPulsesNum, description
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                if(! dbconOpened) {
                        Sqlite.Close();
@@ -90,7 +90,7 @@ class SqlitePulseType : Sqlite
                        " FROM " + Constants.PulseTypeTable + 
                        " ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -127,11 +127,11 @@ class SqlitePulseType : Sqlite
                count =0;
                if(allPulsesName != "") {
                        myTypes [count++] = allPulsesName;
-                       //Log.WriteLine("{0} - {1}", myTypes[count-1], count-1);
+                       //LogB.SQL("{0} - {1}", myTypes[count-1], count-1);
                }
                foreach (string line in myArray) {
                        myTypes [count++] = line;
-                       //Log.WriteLine("{0} - {1}", myTypes[count-1], count-1);
+                       //LogB.SQL("{0} - {1}", myTypes[count-1], count-1);
                }
 
                return myTypes;
@@ -145,7 +145,7 @@ class SqlitePulseType : Sqlite
                        " WHERE name  = '" + typeName +
                        "' ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
diff --git a/src/sqlite/reactionTime.cs b/src/sqlite/reactionTime.cs
index aca96df..d9d5c2d 100644
--- a/src/sqlite/reactionTime.cs
+++ b/src/sqlite/reactionTime.cs
@@ -68,7 +68,7 @@ class SqliteReactionTime : Sqlite
                                " VALUES (" + uniqueID + ", "
                                + personID + ", " + sessionID + ", '" + type + "', "
                                + Util.ConvertToPoint(time) + ", '" + description + "', " + simulated + ")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -102,7 +102,7 @@ class SqliteReactionTime : Sqlite
                        filterPersonString +
                        " ORDER BY upper(" + tp + ".name), reactionTime.uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -147,7 +147,7 @@ class SqliteReactionTime : Sqlite
 
                dbcmd.CommandText = "SELECT * FROM " + Constants.ReactionTimeTable + " WHERE uniqueID == " + 
uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
 
                dbcmd.ExecuteNonQuery();
 
@@ -171,7 +171,7 @@ class SqliteReactionTime : Sqlite
                        "', time = " + Util.ConvertToPoint(time) +
                        ", description = '" + description +
                        "' WHERE uniqueID == " + eventID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
diff --git a/src/sqlite/run.cs b/src/sqlite/run.cs
index df13f88..28aaaf7 100644
--- a/src/sqlite/run.cs
+++ b/src/sqlite/run.cs
@@ -71,7 +71,7 @@ class SqliteRun : Sqlite
                                + personID + ", " + sessionID + ", '" + type + "', "
                                + Util.ConvertToPoint(distance) + ", " + Util.ConvertToPoint(time) + ", '" + 
                                description + "', " + simulated + ", " + Util.BoolToInt(initialSpeed) + ")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -116,7 +116,7 @@ class SqliteRun : Sqlite
                        filterTypeString +
                        " ORDER BY upper(" + tp + ".name), run.uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -163,7 +163,7 @@ class SqliteRun : Sqlite
 
                dbcmd.CommandText = "SELECT * FROM " + Constants.RunTable + " WHERE uniqueID == " + uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
 
                dbcmd.ExecuteNonQuery();
 
@@ -189,7 +189,7 @@ class SqliteRun : Sqlite
                        ", time = " + Util.ConvertToPoint(Convert.ToDouble(time)) + 
                        ", description = '" + description +
                        "' WHERE uniqueID == " + runID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
diff --git a/src/sqlite/runInterval.cs b/src/sqlite/runInterval.cs
index 6d0298c..3d579ec 100644
--- a/src/sqlite/runInterval.cs
+++ b/src/sqlite/runInterval.cs
@@ -74,7 +74,7 @@ class SqliteRunInterval : SqliteRun
                                description + "', '" + limited + "', " + simulated + ", " +
                                Util.BoolToInt(initialSpeed) + ")" ;
                                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -114,7 +114,7 @@ class SqliteRunInterval : SqliteRun
                        filterTypeString +
                        " ORDER BY upper(" + tp + ".name), runInterval.uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -165,7 +165,7 @@ class SqliteRunInterval : SqliteRun
 
                dbcmd.CommandText = "SELECT * FROM " + tableName + " WHERE uniqueID == " + uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -187,7 +187,7 @@ class SqliteRunInterval : SqliteRun
                        " SET personID = " + personID + 
                        ", description = '" + description +
                        "' WHERE uniqueID == " + runID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
diff --git a/src/sqlite/runType.cs b/src/sqlite/runType.cs
index 1ad5d29..9e70bfb 100644
--- a/src/sqlite/runType.cs
+++ b/src/sqlite/runType.cs
@@ -112,7 +112,7 @@ class SqliteRunType : Sqlite
                                myStr[2] + "')" ;       //description
                                */
                                t.Name + "', " + Util.ConvertToPoint(t.Distance) + ", '" + t.Description +    
  "')" ;  
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -136,7 +136,7 @@ class SqliteRunType : Sqlite
                        " WHERE name  = '" + typeName +
                        "' ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -172,7 +172,7 @@ class SqliteRunType : Sqlite
                        whereString +
                        " ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -208,11 +208,11 @@ class SqliteRunType : Sqlite
                count =0;
                if(allRunsName != "") {
                        myTypes [count++] = allRunsName;
-                       //Log.WriteLine("{0} - {1}", myTypes[count-1], count-1);
+                       //LogB.SQL("{0} - {1}", myTypes[count-1], count-1);
                }
                foreach (string line in myArray) {
                        myTypes [count++] = line;
-                       //Log.WriteLine("{0} - {1}", myTypes[count-1], count-1);
+                       //LogB.SQL("{0} - {1}", myTypes[count-1], count-1);
                }
 
                return myTypes;
@@ -225,7 +225,7 @@ class SqliteRunType : Sqlite
                        " FROM " + Constants.RunTypeTable +
                        " WHERE name == '" + typeName + "'";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -265,7 +265,7 @@ class SqliteRunType : Sqlite
                Sqlite.Open();
                dbcmd.CommandText = "Delete FROM " + Constants.RunTypeTable +
                        " WHERE name == '" + name + "'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
@@ -396,7 +396,7 @@ class SqliteRunIntervalType : SqliteRunType
                                //t.Name +      "', " + distance + ", " + t.TracksLimited +     ", " + 
t.FixedValue + ", " +
                                t.Name +        "', " + t.Distance + ", " + Util.BoolToInt(t.TracksLimited) + 
  ", " + t.FixedValue + ", " +
                                Util.BoolToInt(t.Unlimited) +   ", '" + t.Description + "', '" + 
t.DistancesString +    "')" ;  
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                //int myLast = dbcon.LastInsertRowId;
@@ -418,7 +418,7 @@ class SqliteRunIntervalType : SqliteRunType
                        " FROM " + Constants.RunIntervalTypeTable +
                        " ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -475,7 +475,7 @@ class SqliteRunIntervalType : SqliteRunType
                        " WHERE name  = '" + typeName +
                        "' ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -523,7 +523,7 @@ class SqliteRunIntervalType : SqliteRunType
                Sqlite.Open();
                dbcmd.CommandText = "Delete FROM " + Constants.RunIntervalTypeTable +
                        " WHERE name == '" + name + "'";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                Sqlite.Close();
        }
diff --git a/src/sqlite/server.cs b/src/sqlite/server.cs
index 944ee30..5b7d902 100644
--- a/src/sqlite/server.cs
+++ b/src/sqlite/server.cs
@@ -79,7 +79,7 @@ class SqliteServer : Sqlite
                
                dbcmd.CommandText = myString;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                dbcmd.ExecuteNonQuery();
 
@@ -116,7 +116,7 @@ class SqliteServer : Sqlite
                
                dbcmd.CommandText = myString;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                dbcmd.ExecuteNonQuery();
 
@@ -149,7 +149,7 @@ class SqliteServer : Sqlite
                        "', comments = '" + comments +
                        //"', confiable = " + Util.BoolToInt(confiable) + //security: update cannot change 
confiable
                        "' WHERE uniqueID == " + uniqueID;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                if(! dbconOpened)
@@ -163,7 +163,7 @@ class SqliteServer : Sqlite
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * FROM " + Constants.ServerEvaluatorTable + " WHERE uniqueID == " 
+ myUniqueID ; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -200,7 +200,7 @@ class SqliteServer : Sqlite
                        " FROM " + Constants.ServerEvaluatorTable + ", " + Constants.SessionTable + 
                        " WHERE " + Constants.ServerEvaluatorTable + ".uniqueID = " + Constants.SessionTable 
+".evaluatorID" +
                        " GROUP BY " + Constants.ServerEvaluatorTable + ".uniqueID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -220,7 +220,7 @@ class SqliteServer : Sqlite
                Sqlite.Open();
 
                dbcmd.CommandText = str; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index 668bd6d..ce5652c 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -67,7 +67,7 @@ class SqliteSession : Sqlite
                        personsSportID + ", " + personsSpeciallityID + ", " + 
                        personsPractice + ", '" + comments + "', " +
                        serverUniqueID + ")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -107,7 +107,7 @@ class SqliteSession : Sqlite
 
                dbcmd.CommandText = "UPDATE " +Constants.SessionTable + " SET serverUniqueID = " + serverID + 
                        " WHERE uniqueID == " + uniqueID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //if(!dbconOpened)
@@ -121,13 +121,13 @@ class SqliteSession : Sqlite
                        Sqlite.Open();
                } catch {
                        //done because there's an eventual problem maybe thread related on very few starts of 
chronojump
-                       Log.WriteLine("Catched dbcon problem at Session.Select");
+                       LogB.SQL("Catched dbcon problem at Session.Select");
                        Sqlite.Close();
                        Sqlite.Open();
-                       Log.WriteLine("reopened again");
+                       LogB.SQL("reopened again");
                }
                dbcmd.CommandText = "SELECT * FROM " + Constants.SessionTable + " WHERE uniqueID == " + 
myUniqueID ; 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -170,7 +170,7 @@ class SqliteSession : Sqlite
                dbcmd.CommandText = "SELECT " + selectString + " FROM " + Constants.SessionTable + " " + 
                        " WHERE uniqueID != " + sessionIdDisable + " ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -216,7 +216,7 @@ class SqliteSession : Sqlite
                        " WHERE session.personsSportID == sport.uniqueID " + 
                        " AND session.personsSpeciallityID == speciallity.UniqueID " +
                        " ORDER BY session.uniqueID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -255,7 +255,7 @@ class SqliteSession : Sqlite
                //select persons of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.PersonSessionTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_persons;
@@ -270,7 +270,7 @@ class SqliteSession : Sqlite
                //select jumps of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.JumpTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_jumps;
@@ -285,7 +285,7 @@ class SqliteSession : Sqlite
                //select jumpsRj of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.JumpRjTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_jumpsRj;
@@ -300,7 +300,7 @@ class SqliteSession : Sqlite
                //select runs of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.RunTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_runs;
@@ -315,7 +315,7 @@ class SqliteSession : Sqlite
                //select runsInterval of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.RunIntervalTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_runs_interval;
@@ -330,7 +330,7 @@ class SqliteSession : Sqlite
                //select reaction time of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.ReactionTimeTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_rt;
@@ -345,7 +345,7 @@ class SqliteSession : Sqlite
                //select pulses of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.PulseTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_pulses;
@@ -360,7 +360,7 @@ class SqliteSession : Sqlite
                //select multichronopic of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.MultiChronopicTable + 
                        " GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_mcs;
@@ -375,7 +375,7 @@ class SqliteSession : Sqlite
                //select encoder signal of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.EncoderTable + 
                        " WHERE signalOrCurve == 'signal' GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_enc_s;
@@ -390,7 +390,7 @@ class SqliteSession : Sqlite
                //select encoder curve of each session
                dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.EncoderTable + 
                        " WHERE signalOrCurve == 'curve' GROUP BY sessionID ORDER BY sessionID";
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader_enc_c;
@@ -555,7 +555,7 @@ class SqliteSession : Sqlite
                        " AND type == '" + type + "' " +
                        personIDString; 
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -710,7 +710,7 @@ class SqliteServerSession : SqliteSession
                        evaluatorCJVersion + "', '" + evaluatorOS + "', '" +
                        UtilDate.ToSql(uploadedDate) + "', " + uploadingState +
                        ")" ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //int myLast = dbcon.LastInsertRowId;
@@ -733,7 +733,7 @@ class SqliteServerSession : SqliteSession
 
                dbcmd.CommandText = "UPDATE " + Constants.SessionTable + " SET uploadingState = " + state + 
                        " WHERE uniqueID == " + uniqueID ;
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                //if(!dbconOpened)
diff --git a/src/sqlite/speciallity.cs b/src/sqlite/speciallity.cs
index 5f25fef..e95679c 100644
--- a/src/sqlite/speciallity.cs
+++ b/src/sqlite/speciallity.cs
@@ -87,7 +87,7 @@ class SqliteSpeciallity : Sqlite
                
                dbcmd.CommandText = "SELECT name FROM " + Constants.SpeciallityTable + " WHERE uniqueID == " 
+ uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -118,7 +118,7 @@ class SqliteSpeciallity : Sqlite
                        whereString +
                        " ORDER BY uniqueID";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                reader = dbcmd.ExecuteReader();
 
diff --git a/src/sqlite/sport.cs b/src/sqlite/sport.cs
index 3fc3fa5..92c6228 100644
--- a/src/sqlite/sport.cs
+++ b/src/sqlite/sport.cs
@@ -90,7 +90,7 @@ class SqliteSport : Sqlite
                
                dbcmd.CommandText = "SELECT * FROM " + Constants.SportTable + " WHERE uniqueID == " + 
uniqueID;
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
@@ -116,7 +116,7 @@ class SqliteSport : Sqlite
                
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.SportTable + " WHERE name == '" + 
name + "'";
                
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
 
                SqliteDataReader reader;
diff --git a/src/sqlite/stat.cs b/src/sqlite/stat.cs
index 9084053..4cfa09e 100644
--- a/src/sqlite/stat.cs
+++ b/src/sqlite/stat.cs
@@ -72,7 +72,7 @@ class SqliteStat : Sqlite
                        groupByString +
                        orderByString + ini + "jump.tv" + end + " DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -167,7 +167,7 @@ class SqliteStat : Sqlite
                        groupByString +
                        orderByString + ini + "jump.tv" + end + " DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -325,7 +325,7 @@ class SqliteStat : Sqlite
                        groupByString +
                        orderByString + " myIndex DESC, " + ini + "jump.tv" + end + " DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -431,7 +431,7 @@ class SqliteStat : Sqlite
                        groupByString +
                        orderByString + " rj_index DESC, tvavg DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -527,7 +527,7 @@ class SqliteStat : Sqlite
                        groupByString +
                        orderByString + " potency DESC, tvavg DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -589,7 +589,7 @@ class SqliteStat : Sqlite
                        "group by jumps order by jumps DESC limit 1";
                        //this is done because if no jumps, and we don't write last line, it returns a blank 
line
                        //and this crashes when converted to string
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -618,7 +618,7 @@ class SqliteStat : Sqlite
                        "group by tracks order by tracks DESC limit 1";
                        //this is done because if no jumps, and we don't write last line, it returns a blank 
line
                        //and this crashes when converted to string
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                SqliteDataReader reader;
                reader = dbcmd.ExecuteReader();
@@ -713,7 +713,7 @@ class SqliteStat : Sqlite
                        groupByString +
                        orderByString + " rj_index DESC, tvavg DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -822,7 +822,7 @@ class SqliteStat : Sqlite
                        groupByString +
                        orderByString + " speed DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -857,7 +857,7 @@ class SqliteStat : Sqlite
                                        ":",                                            //new separator
                                        maxRuns
                                        );
-Log.WriteLine(intervalSpeeds);
+LogB.SQL(intervalSpeeds);
 
 
                        myArray.Add (reader[0].ToString() + showSexString + showRunTypeString +
@@ -918,7 +918,7 @@ Log.WriteLine(intervalSpeeds);
                        groupByString +
                        orderByString + " myIndex DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -995,7 +995,7 @@ Log.WriteLine(intervalSpeeds);
                        groupByString +
                        orderByString + " resultPercent DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -1081,7 +1081,7 @@ Log.WriteLine(intervalSpeeds);
                        groupByString +
                        orderByString + " myIndex DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -1231,7 +1231,7 @@ Log.WriteLine(intervalSpeeds);
                        //orderByString + ini + "indexPart1 * indexPart2WithoutSqrt" + end + " DESC ";
                        orderByString + "extraWeight";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -1338,7 +1338,7 @@ Log.WriteLine(intervalSpeeds);
                        groupByString +
                        orderByString + "speed DESC ";
 
-               Log.WriteLine(dbcmd.CommandText.ToString());
+               LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
                SqliteDataReader reader;
@@ -1445,10 +1445,10 @@ Log.WriteLine(intervalSpeeds);
 
                //print all     
                IDNameIDDoubleListOfLists superlist = new IDNameIDDoubleListOfLists(idNameList, array);
-               Log.WriteLine("superlist");
-               Log.WriteLine( Util.StringArrayToString(superlist.GetStringArray(),"\n") );
+               LogB.SQL("superlist");
+               LogB.SQL( Util.StringArrayToString(superlist.GetStringArray(),"\n") );
                ArrayList arrayReturn = superlist.GetArray();
-               Log.WriteLine("end of superlist");
+               LogB.SQL("end of superlist");
                
                Sqlite.Close();
                return arrayReturn;
diff --git a/src/statType.cs b/src/statType.cs
index bbe7695..903efe6 100644
--- a/src/statType.cs
+++ b/src/statType.cs
@@ -134,17 +134,17 @@ public class StatType {
        }
 
        private void on_fake_button_row_checked_clicked (object o, EventArgs args) {
-               Log.WriteLine("fakeButtonRowCheckedUnchecked in statType.cs");
+               LogB.Information("fakeButtonRowCheckedUnchecked in statType.cs");
                fakeButtonRowCheckedUnchecked.Click();
        }
        
        private void on_fake_button_rows_selected_clicked (object o, EventArgs args) {
-               Log.WriteLine("fakeButtonRowsSelected in statType.cs");
+               LogB.Information("fakeButtonRowsSelected in statType.cs");
                fakeButtonRowsSelected.Click();
        }
        
        private void on_fake_button_no_rows_selected_clicked (object o, EventArgs args) {
-               Log.WriteLine("fakeButtonNoRowsSelected in statType.cs");
+               LogB.Information("fakeButtonNoRowsSelected in statType.cs");
                //only raise another click if this is not a report. This new click will update things in 
gui/stats.cs
                //this fakeButtons are not initialized in the coming-from-report-statType-constructor
                if(! toReport)
@@ -202,7 +202,7 @@ public class StatType {
                else if (statisticType == Constants.TypeJumperSummary)
                {
                        if(statisticApplyTo.Length == 0) {
-                               Log.WriteLine("Jumper-ret");
+                               LogB.Information("Jumper-ret");
                                return false;
                        }
                        int jumperID = Util.FetchID(statisticApplyTo);
@@ -222,7 +222,7 @@ public class StatType {
                else if(statisticType == Constants.TypeJumpsSimple)
                {
                        if(statisticApplyTo.Length == 0) {
-                               Log.WriteLine("Simple-ret");
+                               LogB.Information("Simple-ret");
                                return false;
                        }
                        
@@ -268,7 +268,7 @@ public class StatType {
                                } else if(indexType == "ChronojumpProfile") {
                                        if(graph) 
                                                //myStat = new GraphChronojumpProfile(myStatTypeStruct); 
-                                               Log.WriteLine("TODO");
+                                               LogB.Warning("TODO");
                                        else 
                                                myStat = new StatChronojumpProfile(myStatTypeStruct, 
treeview_stats); 
                                } else if(indexType == "IE" || indexType == Constants.ArmsUseIndexName || 
@@ -312,7 +312,7 @@ public class StatType {
                else if(statisticType == Constants.TypeJumpsSimpleWithTC)
                {
                        if(statisticApplyTo.Length == 0) {
-                               Log.WriteLine("WithTC-ret");
+                               LogB.Information("WithTC-ret");
                                return false;
                        }
                        
@@ -384,7 +384,7 @@ public class StatType {
                else if(statisticType == Constants.TypeRunsSimple)
                {
                        if(statisticApplyTo.Length == 0) {
-                               Log.WriteLine("Simple-ret");
+                               LogB.Information("Simple-ret");
                                return false;
                        }
                
@@ -396,7 +396,7 @@ public class StatType {
                else if(statisticType == Constants.TypeRunsIntervallic)
                {
                        if(statisticApplyTo.Length == 0) {
-                               Log.WriteLine("Simple-ret");
+                               LogB.Information("Simple-ret");
                                return false;
                        }
                
diff --git a/src/stats/main.cs b/src/stats/main.cs
index b73e543..2a46b1c 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -184,7 +184,7 @@ public class Stat
        
        
        void ItemToggled(object o, ToggledArgs args) {
-               Log.WriteLine("Fake button will be pressed");
+               LogB.Information("Fake button will be pressed");
                fakeButtonRowCheckedUnchecked.Click();
                
                int column = 0;
@@ -193,7 +193,7 @@ public class Stat
                if (store.GetIter (out iter, new TreePath(args.Path)))
                {
                        bool val = (bool) store.GetValue (iter, column);
-                       //Log.WriteLine ("toggled {0} with value {1}", args.Path, !val);
+                       //LogB.Information ("toggled {0} with value {1}", args.Path, !val);
 
                        //if this row is not AVG or SD
                        string avgOrSD = (string) store.GetValue (iter, 1);
@@ -531,7 +531,7 @@ public class Stat
                                CreateOrUpdateAVGAndSD();
                } else {
                        //if we cannot access the treeview, also don't allow to graph or report
-                       Log.WriteLine("no rows Clicking in stats/main.cs simple session");
+                       LogB.Information("no rows Clicking in stats/main.cs simple session");
                        fakeButtonNoRowsSelected.Click();
                }
        }
@@ -599,7 +599,7 @@ public class Stat
                        }
                } else {
                        //if we cannot access the treeview, also don't allow to graph or report
-                       Log.WriteLine("no rows Clicking in stats/main.cs multi session");
+                       LogB.Information("no rows Clicking in stats/main.cs multi session");
                        fakeButtonNoRowsSelected.Click();
                }
        }
@@ -625,7 +625,7 @@ public class Stat
                                } while (okIter && store.IterNext(ref iter));
                        }
                } catch {
-                       Log.WriteLine("On graph or report (or graph, report)");
+                       LogB.Error("On graph or report (or graph, report)");
                }
 
 
@@ -658,7 +658,7 @@ public class Stat
 
                                                if(isThisRowMarked(rowsFound)) {
                                                        for(int column = 0; column < myDataColumns; column 
++) {
-                                                               //Log.WriteLine("value: {0}", 
store.GetValue(iter, column+2));
+                                                               //LogB.Information("value: {0}", 
store.GetValue(iter, column+2));
                                                                //string myValue = store.GetValue(iter, 
column+2).ToString();
                                                                string myValue = myStrFull[column+1];
                                                                if(myValue != "-") {
@@ -687,9 +687,9 @@ public class Stat
                                                        sendAVG[j+1] = Util.TrimDecimals( (sumValue[j] / 
valuesOk[j]).ToString(), pDN );
                                                else
                                                        sendAVG[j+1] = "-";
-                                               //Log.WriteLine("j({0}), SendAVG[j]({1}), 
valuesList[j]({2})", j, sendAVG[j+1], valuesList[j]);
+                                               //LogB.Information("j({0}), SendAVG[j]({1}), 
valuesList[j]({2})", j, sendAVG[j+1], valuesList[j]);
                                                sendSD[j+1] = Util.TrimDecimals( 
Util.CalculateSD(valuesList[j], sumValue[j], valuesOk[j]).ToString(), pDN );
-                                               //Log.WriteLine("j({0}), SendSD[j]({1})", j, sendSD[j+1]);
+                                               //LogB.Information("j({0}), SendSD[j]({1})", j, sendSD[j+1]);
                                        }
                                        printData( sendAVG );
                                        printData( sendSD );
@@ -699,11 +699,11 @@ public class Stat
                        /* check this if it's needed now*/
                        //write a row of AVG because graphs of stats with AVG and SD
                        //are waiting the AVG row for ending and painting graph
-                       Log.WriteLine("catched!");
+                       LogB.Error("catched!");
                        string [] sendAVG = new string [myDataColumns +1];
                        sendAVG[0] = Catalog.GetString("AVG");
                        printData(sendAVG);
-                       Log.WriteLine("Graph should work!");
+                       LogB.Information("Graph should work!");
                }
        }
 
@@ -765,7 +765,7 @@ public class Stat
                recordStatValues(statValues);
 
                if(toReport) {
-                       //Log.WriteLine("REPORT: {0}", statValues[0]);
+                       //LogB.Information("REPORT: {0}", statValues[0]);
                        //print marked rows and AVG, SD rows
                        bool allowedRow = isThisRowMarked(rowsPassedToReport);
 
@@ -803,7 +803,7 @@ public class Stat
                        if(statValues[0] != Catalog.GetString("AVG") && statValues[0] != 
Catalog.GetString("SD")) {
                                store.SetValue(iter, 0, true);  //first col is true if it's not AVG or SD
                                markedRows.Add(myPath.ToString());
-                               //Log.WriteLine("FROM PRINTDATA Added to markedRows row:{0}", 
myPath.ToString());
+                               //LogB.Information("FROM PRINTDATA Added to markedRows row:{0}", 
myPath.ToString());
                        }
                        
                        for(int i=0; i < statValues.Length; i++) {
@@ -826,7 +826,7 @@ public class Stat
        {
                int count = 0;
                for (int i=0; i< myArray.Count && count <= limit ; i ++) {
-                       //Log.WriteLine("searching {0}, myArray[i] {1}, limit {2}", searching, myArray[i], 
limit);
+                       //LogB.Information("searching {0}, myArray[i] {1}, limit {2}", searching, myArray[i], 
limit);
                        if (searching == myArray[i].ToString()) {
                                count ++;
                        }
@@ -920,7 +920,7 @@ public class Stat
                int countCols=0;
                int countRows=0; //on multisession, names of persons come in rows. Use this to discard some 
rows if unselected on treeview (! markedRows)
                foreach(GraphSerie serie in GraphSeries) {
-                       Log.WriteLine("serie:" + serie.Title);
+                       LogB.Information("serie:" + serie.Title);
                        if(
                                        side == Sides.LEFT && ! serie.IsLeftAxis ||
                                        side == Sides.RIGHT && serie.IsLeftAxis) {
@@ -939,7 +939,7 @@ public class Stat
 
                        //on XY only take two vars
                        if(gro.Type == Constants.GraphTypeXY) {
-                               Log.WriteLine("groVarX: " + gro.VarX + " groVarY: " + gro.VarY + " tit: " + 
serie.Title);
+                               LogB.Information("groVarX: " + gro.VarX + " groVarY: " + gro.VarY + " tit: " 
+ serie.Title);
                                if(gro.VarX != serie.Title && gro.VarY != serie.Title)
                                        continue;
                                else if (xyFirstFound == "") {
@@ -960,7 +960,7 @@ public class Stat
                        string sep = "";
                        countCols=0;
                        foreach(string val in serie.SerieData) {
-                               Log.Write(" val:" + val);
+                               LogB.Information(" val:" + val);
                                bool use = true;
 
                                //on simplesession, cols are persons. See if they are discarded on markedRows
diff --git a/src/stats/rjEvolution.cs b/src/stats/rjEvolution.cs
index fd0f37a..68bb4a3 100644
--- a/src/stats/rjEvolution.cs
+++ b/src/stats/rjEvolution.cs
@@ -114,12 +114,12 @@ public class StatRjEvolution : Stat
                                myCount += (tv * 100) / tc;
                        }
                        
-                       //Log.WriteLine("i{0}, myCount{1}, bestCount{2}", i, myCount, bestCount);
+                       //LogB.Information("i{0}, myCount{1}, bestCount{2}", i, myCount, bestCount);
                        //if found a max, record it
                        if(myCount > bestCount && !jumpFinished) {
                                bestCount = myCount;
                                bestPos = i;
-                               //Log.WriteLine("best i{0}", i);
+                               //LogB.Information("best i{0}", i);
                        }
                }
                return bestPos;
@@ -130,7 +130,7 @@ public class StatRjEvolution : Stat
                        for ( int i=0; i < statValues.Length ; i=i+2 ) {
 
                                if(i >= bestPos && i < bestPos+numContinuous*2) {
-                                       //Log.WriteLine("i{0}, bp{1}, svi{2}, svi+1{3}", i, bestPos, 
statValues[i], statValues[i+1]);
+                                       //LogB.Information("i{0}, bp{1}, svi{2}, svi+1{3}", i, bestPos, 
statValues[i], statValues[i+1]);
                                        statValues[i] = "<font color=\"red\">" + statValues[i] + "</font>";
                                        statValues[i+1] = "<font color=\"red\">" + statValues[i+1] + 
"</font>";
                                }
@@ -219,7 +219,7 @@ public class StatRjEvolution : Stat
                        if(statValues[0] != Catalog.GetString("AVG") && statValues[0] != 
Catalog.GetString("SD")) {
                                store.SetValue(iter, 0, true);  //first col is true if it's not AVG or SD
                                markedRows.Add(myPath.ToString());
-                               //Log.WriteLine("FROM PRINTDATA (EVOLUTION) Added to markedRows row:{0}", 
myPath.ToString());
+                               //LogB.Information("FROM PRINTDATA (EVOLUTION) Added to markedRows row:{0}", 
myPath.ToString());
                        }
                        
                        for(int i=0; i < statValues.Length; i++) {
diff --git a/src/treeViewEvent.cs b/src/treeViewEvent.cs
index f21c58b..3219de8 100644
--- a/src/treeViewEvent.cs
+++ b/src/treeViewEvent.cs
@@ -363,7 +363,7 @@ public class TreeViewEvent
                                do {
                                        int iterEventID =  Convert.ToInt32 ( treeview.Model.GetValue (iter, 
eventIDColumn) );
                                        if(iterEventID == uniqueID) {
-                                               Log.WriteLine("We select:" + iterEventID);
+                                               LogB.Information("We select:" + iterEventID);
                                                treeview.Selection.SelectIter (iter);
                                                found = true;
                                        }
diff --git a/src/util.cs b/src/util.cs
index aea1088..0ee396b 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -250,7 +250,7 @@ public class Util
                                }
                        }
                }
-               Log.WriteLine(string.Format("Error, myType: {0} not found", myType));
+               LogB.Error(string.Format("Error, myType: {0} not found", myType));
                return false;
        }
        
@@ -264,7 +264,7 @@ public class Util
                                }
                        }
                }
-               Log.WriteLine(string.Format("Error, myType: {0} not found", myType));
+               LogB.Error(string.Format("Error, myType: {0} not found", myType));
                return false;
        }
 
@@ -801,7 +801,7 @@ public class Util
                foreach (string d in dirs) {
                        if( ! Directory.Exists(d)) {
                                Directory.CreateDirectory (d);
-                               Log.WriteLine (string.Format("created dir: {0}", d));
+                               LogB.Information ("created dir:", d);
                        }
                }
        }
@@ -815,7 +815,7 @@ public class Util
                string sessionDir = GetVideoSessionDir(sessionID);
                if( ! Directory.Exists(sessionDir)) {
                        Directory.CreateDirectory (sessionDir);
-                       Log.WriteLine (string.Format("created dir: {0}", sessionDir));
+                       LogB.Information ("created dir:", sessionDir);
                }
        }
 
@@ -915,7 +915,7 @@ public class Util
                string backupDir = GetDatabaseDir() + Path.DirectorySeparatorChar + "backup";
                if( ! Directory.Exists(backupDir)) {
                        Directory.CreateDirectory (backupDir);
-                       Log.WriteLine ("created backup dir");
+                       LogB.Information ("created backup dir");
                }
        }
 
@@ -929,7 +929,7 @@ public class Util
                        File.Copy(System.IO.Path.Combine(homeDir, "chronojump.db"), 
                                System.IO.Path.Combine(backupDir, "chronojump_" + dateParsed + ".db"));
                else {
-                       Log.WriteLine("Error, chronojump.db file doesn't exist!");
+                       LogB.Error("Error, chronojump.db file doesn't exist!");
                }
        }
 
@@ -944,13 +944,13 @@ public class Util
        public static bool FileDelete(string fileName) {
                try {
                        if(File.Exists(fileName)) {
-                               Log.WriteLine("Deleting " + fileName + " ...");
+                               LogB.Information("Deleting " + fileName + " ...");
                                File.Delete(fileName);
-                               Log.WriteLine("Deleted");
+                               LogB.Information("Deleted");
                                return true;
                        }
                } catch {
-                       Log.WriteLine("Problem deleting");
+                       LogB.Error("Problem deleting");
                }
                return false;
        }
diff --git a/src/utilCSV.cs b/src/utilCSV.cs
index 7fb9784..6a0d4ee 100644
--- a/src/utilCSV.cs
+++ b/src/utilCSV.cs
@@ -29,7 +29,7 @@ public class UtilCSV
 
        public static void ReadValues(string fileRead)
        {
-               Log.WriteLine("READING CSV");
+               LogB.Information("READING CSV");
                List<string> columns = new List<string>();
                using (var reader = new CsvFileReader(fileRead))
                {
@@ -37,13 +37,13 @@ public class UtilCSV
                        {
                                string sep = "";
                                foreach(string str in columns) {
-                                       Log.Write(sep + str);
+                                       Console.Write(sep + str);
                                        sep = ":";
                                }
-                               Log.Write("\n");
+                               Console.Write("\n");
                        }
                }
-               Log.WriteLine("READED CSV");
+               LogB.Information("READED CSV");
        }
 }
 
diff --git a/src/utilEncoder.cs b/src/utilEncoder.cs
index 9bcb2ff..b8b039a 100644
--- a/src/utilEncoder.cs
+++ b/src/utilEncoder.cs
@@ -54,7 +54,7 @@ public class UtilEncoder
                foreach (string d in dirs) {
                        if( ! Directory.Exists(d)) {
                                Directory.CreateDirectory (d);
-                               Log.WriteLine (string.Format("created dir: {0}", d));
+                               LogB.Information ("created dir:", d);
                        }
                }
        }
@@ -87,7 +87,7 @@ public class UtilEncoder
                foreach (string d in dirs) {
                        if( ! Directory.Exists(d)) {
                                Directory.CreateDirectory (d);
-                               Log.WriteLine (string.Format("created dir: {0}", d));
+                               LogB.Information ("created dir:", d);
                        }
                }
        }
@@ -137,7 +137,7 @@ public class UtilEncoder
                                                        Path.DirectorySeparatorChar + fileName, true);
                                } catch {
                                        new DialogMessage(Constants.MessageTypes.WARNING, 
Constants.FileCopyProblem);
-                                       Log.WriteLine(Constants.FileCopyProblem);
+                                       LogB.Error(Constants.FileCopyProblem);
                                        return "";
                                }
 //                     }
@@ -154,14 +154,14 @@ public class UtilEncoder
                                File.Copy(origin, dest, true);
                        } catch {
                                new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileCopyProblem);
-                               Log.WriteLine(Constants.FileCopyProblem);
+                               LogB.Error(Constants.FileCopyProblem);
                                return false;
                        }
                        return true;
                }
 
                new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileNotFound);
-               Log.WriteLine(Constants.FileNotFound);
+               LogB.Error(Constants.FileNotFound);
                return false;
        }
        
@@ -273,7 +273,7 @@ public class UtilEncoder
        
        public static REngine RunEncoderCaptureCsharpInitializeR(REngine rengine, out Constants.Status 
RInitialized) 
        {
-               Log.WriteLine("initializing rdotnet");
+               LogB.Information("initializing rdotnet");
                
                //RDotNet.StartupParameter rsup = new RDotNet.StartupParameter();
                //rsup.Interactive = false;
@@ -305,8 +305,8 @@ public class UtilEncoder
                        utilRPath = utilRPath.Replace("\\","/");
                        graphRPath = graphRPath.Replace("\\","/");
                }
-               Log.WriteLine(utilRPath);
-               Log.WriteLine(graphRPath);
+               LogB.Information(utilRPath);
+               LogB.Information(graphRPath);
                
                try {
                        //load extrema
@@ -329,6 +329,7 @@ public class UtilEncoder
                        GenericVector testResult = rengine.Evaluate("t.test(group1, group2)").AsList();
                        double p = testResult["p.value"].AsNumeric().First();
 
+                       //not using LogB because like with Console the format of numbers is displayed better
                        Console.WriteLine("Group1: [{0}]", string.Join(", ", group1));
                        Console.WriteLine("Group2: [{0}]", string.Join(", ", group2));
                        Console.WriteLine("P-value = {0:0.000}", p);
@@ -337,7 +338,7 @@ public class UtilEncoder
                        return rengine;
                }
 
-               Log.WriteLine("initialized rdotnet");
+               LogB.Information("initialized rdotnet");
                
                RInitialized = Constants.Status.OK;
 
@@ -485,7 +486,7 @@ public class UtilEncoder
                if (UtilAll.IsWindows()) {
                        //on Windows we need the \"str\" to call without problems in path with spaces
                        pBin = "\"" + System.IO.Path.Combine(Util.GetPrefixDir(), "bin" + 
Path.DirectorySeparatorChar + "Rscript.exe") + "\"";
-                       Log.WriteLine("pBin:" + pBin);
+                       LogB.Information("pBin:", pBin);
                }
                
 
@@ -507,10 +508,10 @@ public class UtilEncoder
                //on Windows we need the \"str\" to call without problems in path with spaces
                pinfo.Arguments = "\"" + getEncoderScriptCallGraph() + "\" " + optionsFile;
        
-               Log.WriteLine("Arguments:" + pinfo.Arguments);
-               Log.WriteLine("--- 1 --- " + optionsFile.ToString() + " ---");
-               Log.WriteLine("--- 2 --- " + scriptOptions + " ---");
-               Log.WriteLine("--- 3 --- " + pinfo.Arguments.ToString() + " ---");
+               LogB.Information("Arguments:", pinfo.Arguments);
+               LogB.Information("--- 1 --- " + optionsFile.ToString() + " ---");
+               LogB.Information("--- 2 --- " + scriptOptions + " ---");
+               LogB.Information("--- 3 --- " + pinfo.Arguments.ToString() + " ---");
                
                string outputFileCheck = "";
                string outputFileCheck2 = "";
@@ -539,12 +540,12 @@ public class UtilEncoder
 
 
                //delete output file check(s)
-               Console.WriteLine("Deleting... " + outputFileCheck);
+               LogB.Information("Deleting... " + outputFileCheck);
                if (File.Exists(outputFileCheck))
                        File.Delete(outputFileCheck);
 
                if(outputFileCheck2 != "") {
-                       Console.WriteLine("Deleting... " + outputFileCheck2);
+                       LogB.Information("Deleting... " + outputFileCheck2);
                        if (File.Exists(outputFileCheck2))
                                File.Delete(outputFileCheck2);
                }
@@ -601,7 +602,7 @@ public class UtilEncoder
                if (UtilAll.IsWindows()) {
                        //on Windows we need the \"str\" to call without problems in path with spaces
                        pBin = "\"" + System.IO.Path.Combine(Util.GetPrefixDir(), "bin" + 
Path.DirectorySeparatorChar + "Rscript.exe") + "\"";
-                       Log.WriteLine("pBin:" + pBin);
+                       LogB.Information("pBin:", pBin);
 
                        //On win32 R understands backlash as an escape character and 
                        //a file path uses Unix-like path separator '/'         
@@ -633,7 +634,7 @@ public class UtilEncoder
                
                //on Windows we need the \"str\" to call without problems in path with spaces
                pinfo.Arguments = "\"" + getEncoderScriptInertiaMomentum() + "\" " + optionsFile;
-               Log.WriteLine("Arguments:" + pinfo.Arguments);
+               LogB.Information("Arguments:", pinfo.Arguments);
                
                //Wait until this to update encoder gui (if don't wait then treeview will be outdated)
                string outputFileCheck = outputData;
@@ -646,7 +647,7 @@ public class UtilEncoder
                pinfo.RedirectStandardOutput = true; 
 
                //delete output file check(s)
-               Console.WriteLine("Deleting... " + outputFileCheck);
+               LogB.Information("Deleting... ", outputFileCheck);
                if (File.Exists(outputFileCheck))
                        File.Delete(outputFileCheck);
 
@@ -754,10 +755,10 @@ public class UtilEncoder
                                } while(true);
                                
                                if(sum == 0 || count == 0) 
-                                       Log.WriteLine("inertial check == 0, no data");
+                                       LogB.Warning("inertial check == 0, no data");
                                else {
                                        double average = sum * 1.0 / count * 1.0;
-                                       Log.WriteLine("inertial check == " + average.ToString());
+                                       LogB.Information("inertial check == " + average.ToString());
                                        if( 
                                                        (average < 0 && inertialCheckPositive) ||
                                                        (average > 0 && ! inertialCheckPositive) ) {
@@ -784,7 +785,7 @@ public class UtilEncoder
 
 
                if(reverseSign) {
-                       Log.WriteLine("reversingSign");
+                       LogB.Information("reversingSign");
                        string contentsReversed = "";
                        string sep = "";
                        using (StringReader reader = new StringReader (contents)) {
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 498b6f5..6fff74e 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -87,7 +87,7 @@ public class UtilGtk
                TreeIter iter;
                myCombo.Model.GetIterFirst(out iter);
                do {
-                       Log.WriteLine((string) myCombo.Model.GetValue (iter, 0));
+                       LogB.Information((string) myCombo.Model.GetValue (iter, 0));
                } while (myCombo.Model.IterNext (ref iter));
        }
 
diff --git a/src/utilVideo.cs b/src/utilVideo.cs
index ea3ea6f..39dba7c 100644
--- a/src/utilVideo.cs
+++ b/src/utilVideo.cs
@@ -33,10 +33,10 @@ public class UtilVideo
                List<LongoMatch.Video.Utils.Device> devices = 
LongoMatch.Video.Utils.Device.ListVideoDevices();
                string [] devicesStr = new String[devices.Count];
                int count = 0;
-               Log.WriteLine("yessssssssssssssssss");
+               LogB.Information("Searching video devices");
                foreach(LongoMatch.Video.Utils.Device dev in devices) {
                        devicesStr[count++] = dev.ID.ToString();
-                       Log.WriteLine(dev.ID.ToString());
+                       LogB.Information(dev.ID.ToString());
                }
                return devicesStr;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]