diff --git a/Demo.cpp b/Demo.cpp
index 6fb2fc590d7824a8b72f2c8c6147b68fbb0c9ef9..30314a53f007b99a0f2196b3a6714cc58fdfebb0 100644
--- a/Demo.cpp
+++ b/Demo.cpp
@@ -316,6 +316,13 @@ int main(int argc, char * argv[])
         clock_t begin = clock();
 
         fileName =  inputDir + TToolBox::getFileName(frameCounter);
+
+        //check the string
+        cout <<"open fileName: "<< fileName<<endl;
+        if(fileName.empty())
+          cerr <<"error: empty string fileName"<<endl;
+
+
         cout <<"\t"<<frameCounter<<"\tof \t"<<amountFiles<<"  load file :"<< fileName<<endl;
         //cv::imwrite(convert.str().c_str(), img_output);
         //we open the file
@@ -504,6 +511,12 @@ int main(int argc, char * argv[])
             //! step 8: we write down all our results in yml file
             std::string nameOutPutFileData =  outputDir + TToolBox::mNzero(frameCounter) + ".yml";
 
+            //check the string
+            cout <<"write output nameOutPutFileData: "<< nameOutPutFileData<<endl;
+            if(nameOutPutFileData.empty())
+              cerr <<"error: empty string nameOutPutFileData"<<endl;
+
+
             FileStorage fs(nameOutPutFileData.c_str(), FileStorage::WRITE);
             fs << "masscenters" <<  massCenters;
             fs << "polygonselection"<< contourSelection;
@@ -546,6 +559,12 @@ int main(int argc, char * argv[])
                 addWeighted( imgDebugPaint2, 0.7, imgOverlay2, 0.3, 0.0, imgOverlay2);
                 //we write the file down
                 std::string nameOutPutFileDBGpic =  outputDir + TToolBox::mNzero(frameCounter) + ".jpg";
+
+                //check the string
+                cout <<"write dbg file: "<< nameOutPutFileDBGpic<<endl;
+                if(nameOutPutFileDBGpic.empty())
+                  cerr <<"error: empty string nameOutPutFileDBGpic"<<endl;
+
                 imwrite(nameOutPutFileDBGpic.c_str(),imgOverlay2);
 
             }
@@ -553,7 +572,7 @@ int main(int argc, char * argv[])
         }//end if the loaded picture has data
         else
         {
-            cout<<"error loading file: "<< fileName<<", will skip this file"<<endl;
+            cerr<<"error loading file: "<< fileName<<", will skip this file"<<endl;
             myFileErrorList.push_back(fileName);
         }