Index: /OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/utils/runapp/runapp.cpp
===================================================================
--- /OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/utils/runapp/runapp.cpp (revision 10027)
+++ /OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/utils/runapp/runapp.cpp (revision 10042)
@@ -8,9 +8,11 @@
 #include <stdlib.h>
 
+// #define DEBUG
+
 int main(int argc, char** argv)
 {
     osg::ArgumentParser arguments(&argc, argv);
     
-#if DEBUG    
+#ifdef DEBUG    
     std::ofstream fout("output.txt");
 #endif
@@ -131,13 +133,13 @@
                 std::string var = argument.substr(start_pos+2, end_pos-start_pos-2);
                 const char* str = getenv(var.c_str());
-#if DEBUG    
-                std::cout<<"for argument = ["<<argument<<"]"<<std::endl;
-                std::cout<<"Found ["<<var<<"] = "<<str<<std::endl;
+#ifdef DEBUG    
+                fout<<"for argument = ["<<argument<<"]"<<std::endl;
+                fout<<"Found ["<<var<<"] = "<<str<<std::endl;
 #endif
                 argument.erase(start_pos, end_pos-start_pos+1);
                 argument.insert(start_pos, str);
 
-#if DEBUG    
-                std::cout<<"new argument = ["<<argument<<"]"<<std::endl;
+#ifdef DEBUG    
+                fout<<"new argument = ["<<argument<<"]"<<std::endl;
 #endif
             }
@@ -157,5 +159,5 @@
         
         std::cout<<"Running : "<<runstring<<std::endl;
-#if DEBUG    
+#ifdef DEBUG    
         fout<<"Running : "<<runstring<<std::endl;
 #endif
@@ -176,5 +178,5 @@
         std::cout<<"File : "<<runstring<<std::endl;
 
-#if DEBUG    
+#ifdef DEBUG    
         fout<<"File : "<<runstring<<std::endl;
 #endif
@@ -226,5 +228,5 @@
     std::cout<<"Running : "<<runstring<<std::endl;
 
-#if DEBUG    
+#ifdef DEBUG    
     fout<<"Running : "<<runstring<<std::endl;
 #endif
