Index: branches/FEPSimulator/HighwaysParser.cpp
===================================================================
--- branches/FEPSimulator/HighwaysParser.cpp	(revision 209)
+++ branches/FEPSimulator/HighwaysParser.cpp	(revision 217)
@@ -99,9 +99,4 @@
             newStation->length = newStation->loops.size() * 2 + CONTROL_DATA_LEN;
             newStation->dataPack = DataPacker::packData(newStation);
-            for(int byte = 0; byte < newStation->length; byte++)
-            {
-                printf("%02X", (unsigned char) newStation->dataPack[byte]);
-            }
-            printf("\n");
             
             this->stations.push_back(newStation);
Index: branches/FEPSimulator/nbproject/private/private.xml
===================================================================
--- branches/FEPSimulator/nbproject/private/private.xml	(revision 212)
+++ branches/FEPSimulator/nbproject/private/private.xml	(revision 217)
@@ -8,12 +8,9 @@
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
+            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/network.h</file>
+            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.cpp</file>
+            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/fep.h</file>
+            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.h</file>
             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/HighwaysParser.cpp</file>
-            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/fep.h</file>
-            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/DataPacker.cpp</file>
-            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/HighwaysParser.h</file>
-            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.cpp</file>
-            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/network.h</file>
-            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/Makefile</file>
-            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/tests/HighwaysParserTest.cpp</file>
         </group>
     </open-files>
Index: branches/FEPSimulator/FEPSim.cpp
===================================================================
--- branches/FEPSimulator/FEPSim.cpp	(revision 215)
+++ branches/FEPSimulator/FEPSim.cpp	(revision 217)
@@ -7,15 +7,22 @@
     this->FEP_REV = FEP_REV;
     this->SOCK_PORT = SOCK_PORT;
+    
+    // clear log file
+    FEPLogFile.open(FEPLogFileName, ios::trunc);
+    FEPLogFile.close();
 }
 
-FEPSim::~FEPSim() { 
+FEPSim::~FEPSim() {
+    FEPLogFile.close();
 }
 
 void FEPSim::handleCallResponse(void *response) {
     // Failed RPC Call 
-    if (response == NULL) { clnt_perror(clnt, "RPC call failed");
+    if (response == NULL) { 
+        clnt_perror(clnt, "RPC call failed");
     }
     // Successful RPC Call
-    else { cout << "Successful RPC call to ATMS..." << endl;
+    else { 
+        FEPLogFile << "Successful RPC call to ATMS..." << endl;
     }
 }
@@ -30,5 +37,5 @@
     for (int i = 0; i < lines.size(); i++) {
         fep_reply fepReply;
-        cout << "Sending fepReply for line #" << lines.at(i)->lineNum << endl;
+        
         // populate reply
         fepReply.reply = SHORTPOLL;
@@ -37,11 +44,4 @@
         fepReply.kind = (enum polltype) 0;
         fepReply.flag = (enum replykind) 0;
-
-        /***********************************
-         * We might need to handle this on the java side if its an
-         * issue
-        lines.at(i).schedleSeq += 1;
-        lines.at(i).globalSeq += 51;
-         */
 
         fepReply.schedule_sequence = lines.at(i)->schedleSeq;
@@ -90,11 +90,11 @@
             fepReply.answers.fep_answer_list_u.shortp.answers[0] = fsa;
             // send out data
-            //printf("Transferring line=%d, lds_drop_no=%d...\n", lines.at(i)->lineNum, (int)ldsMap.at(index)->drop);
-            // Make RPC Call and handle response
-            // printf("Handling ATMS response...\n");
+            
+            FEPLogFile << "Sending fepReply for line #" << lines.at(i)->lineNum 
+                    << " station number #" 
+                    << ldsMap.at(lines.at(i)->ldsIndex.at(j)) << endl;
+            
             // Transfer the station data to ATMS and listen for response
             handleCallResponse(fep_reply_xfer_32(&fepReply, clnt));
-            unsigned int sleepseconds = 50000;
-            usleep(sleepseconds);
         }
     }
@@ -108,8 +108,8 @@
         // Prepare and send the highway status as FEP replies
         sendReplys(buffer);
-        cout << "Destroying client..." << endl;
+        FEPLogFile << "Destroying client..." << endl;
         clnt_destroy(clnt);
         int startTime = time(NULL);
-        cout << "time is: " << startTime << endl;
+        FEPLogFile << "time is: " << startTime << endl;
     }
 }
@@ -127,5 +127,5 @@
         success = false;
     } else {
-        cout << "Client created" << endl;
+        FEPLogFile << "Client created" << endl;
     }
     return success;
@@ -185,6 +185,4 @@
             totBytes += n;
         }
-        HighwaysParser highwaysParser = HighwaysParser(buffer);
-
 
         if (n < 0) {
@@ -192,7 +190,10 @@
             exit(1);
         }
-
+        
+        FEPLogFile.open(FEPLogFileName, ios::app);
         // send data to atms
         manageClientConnection(buffer);
+        FEPLogFile << "attempt" << endl;
+        FEPLogFile.close();
     }
 }
Index: branches/FEPSimulator/FEPSim.h
===================================================================
--- branches/FEPSimulator/FEPSim.h	(revision 214)
+++ branches/FEPSimulator/FEPSim.h	(revision 217)
@@ -33,4 +33,5 @@
 #include "fep.h"
 #include <iostream>
+#include <fstream>
 #include <stdio.h>
 #include <stdlib.h>
@@ -44,5 +45,7 @@
 
 const int BUFF_SIZE = 1266341;
-
+const string FEPLogFileName = "FEPSimLog.txt";
+static ofstream FEPLogFile;
+    
 class FEPSim {
 public:
@@ -84,5 +87,5 @@
     int FEP_REV;
     int SOCK_PORT;
-
+    
     /**
      * Handler for the ATMS RPC Response (to the client RPC Call)
@@ -102,5 +105,5 @@
      */
     void sendReplys(char * xml);
-
+    
 };
 
