Index: /trunk/BNC/bncapp.cpp
===================================================================
--- /trunk/BNC/bncapp.cpp	(revision 942)
+++ /trunk/BNC/bncapp.cpp	(revision 943)
@@ -449,5 +449,5 @@
   allLines += line;
 
-  printOutput(printFile, lineV2, lineV3, allLines);
+  printOutput(printFile, _ephStreamGPS, lineV2, lineV3, allLines);
 }
 
@@ -497,23 +497,24 @@
   allLines += line;
 
-  printOutput(printFile, lineV2, lineV3, allLines);
+  printOutput(printFile, _ephStreamGlonass, lineV2, lineV3, allLines);
 }
 
 // Output
 ////////////////////////////////////////////////////////////////////////////
-void bncApp::printOutput(bool printFile, const QString& lineV2, 
+void bncApp::printOutput(bool printFile, QTextStream* stream,
+                         const QString& lineV2, 
                          const QString& lineV3,
                          const QByteArray& allLines) {
   // Output into file
   // ----------------
-  if (printFile && _ephStreamGPS) {
+  if (printFile && stream) {
     if (_rinexVers == 2) {
-      *_ephStreamGPS << lineV2.toAscii();
+      *stream << lineV2.toAscii();
     }
     else {
-      *_ephStreamGPS << lineV3.toAscii();
-    }
-    *_ephStreamGPS << allLines;
-    _ephStreamGPS->flush();
+      *stream << lineV3.toAscii();
+    }
+    *stream << allLines;
+    stream->flush();
   }
 
