/// Function - RunAllChecks
        /// <summary>
        /// Thread starts all checks.
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="pathes"></param>
        static void RunAllChecks(string filePath, string destPath, string [] pathes, ArrayList tools)
        {
            //variable declaration.
            Hashtable keywords = new Hashtable();
            Hashtable includes = new Hashtable();
            Dictionary <string, string>    defines       = new Dictionary <string, string>();
            Dictionary <string, ArrayList> funcVariables = new Dictionary <string, ArrayList>();
            ArrayList globalVariable = new ArrayList();

            //initialize
            try
            {
                GeneralCompilerFunctions.initializeKeywordsAndSyntext(ansiCFile, filePath, CSyntextFile, ignoreVariablesTypesPath, keywords, includes, defines, pathes);
            }
            catch (Exception e)
            {
                AddToLogString(filePath, "ERROR IN PREPROCESSOR");
                ConnectionServer.CloseConnection(threadNumber, "ERROR IN PREPROCESSOR " + e.ToString(), GeneralConsts.ERROR);
            }

            AddToLogString(filePath, keywords.Count.ToString());
            //Syntax Check.
            try
            {
                compileError = GeneralCompilerFunctions.SyntaxCheck(filePath, globalVariable, keywords, funcVariables, threadNumber);
            }
            catch (Exception e)
            {
                AddToLogString(filePath, "ERROR IN SyntaxCheck");
                ConnectionServer.CloseConnection(threadNumber, "ERROR IN SyntaxCheck " + e.ToString(), GeneralConsts.ERROR);
            }

            if (!compileError)
            {
                GeneralCompilerFunctions.printArrayList(filePath, keywords);
                AddToLogString(filePath, keywords.Count.ToString());
                //just tests.
                try
                {
                    GeneralRestApiServerMethods.CreateFinalJson(filePath, includes, globalVariable, funcVariables, defines, final_json);
                }
                catch (Exception e)
                {
                    AddToLogString(filePath, "ERROR Creating final json");
                    ConnectionServer.CloseConnection(threadNumber, "ERROR Creating final json " + e.ToString(), GeneralConsts.ERROR);
                }

                string dataJson = JsonConvert.SerializeObject(final_json[filePath]["codeInfo"]);
                AddToLogString(filePath, "new json " + dataJson);
                Thread threadOpenTools = new Thread(() => RunAllTasks(filePath, destPath, tools));
                threadOpenTools.Start();
                threadOpenTools.Join(GeneralConsts.TIMEOUT_JOIN);
                ConnectionServer.CloseConnection(threadNumber, FINISH_SUCCESFULL, GeneralConsts.FINISHED_SUCCESFULLY);
                AddToLogString(filePath, FINISH_SUCCESFULL);
                Console.WriteLine(logFiles[filePath]);
                Thread writeToFile = new Thread(() => File.AppendAllText(logFile, logFiles[filePath]));
                writeToFile.Start();
                writeToFile.Join(GeneralConsts.TIMEOUT_JOIN);
            }
        }