Index: /trunk/BNS/bns.cpp
===================================================================
--- /trunk/BNS/bns.cpp	(revision 3040)
+++ /trunk/BNS/bns.cpp	(revision 3041)
@@ -113,6 +113,8 @@
   // Log File
   // --------
+  _append = Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked;
+
   QIODevice::OpenMode oMode;
-  if (Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) {
+  if (_append) {
     oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append;
   }
@@ -652,5 +654,5 @@
     }
     if (_sp3) {
-      _sp3->write(GPSweek, GPSweeks, prn, xx);
+      _sp3->write(GPSweek, GPSweeks, prn, xx, _append);
     }
   }
Index: /trunk/BNS/bns.h
===================================================================
--- /trunk/BNS/bns.h	(revision 3040)
+++ /trunk/BNS/bns.h	(revision 3041)
@@ -91,4 +91,5 @@
   bnsSP3*                   _sp3;
   QByteArray                _clkLine;
+  bool                      _append;
   
   int    _GPSweek;
Index: /trunk/BNS/bnsoutf.cpp
===================================================================
--- /trunk/BNS/bnsoutf.cpp	(revision 3040)
+++ /trunk/BNS/bnsoutf.cpp	(revision 3041)
@@ -137,5 +137,5 @@
 ////////////////////////////////////////////////////////////////////////////
 t_irc bnsoutf::write(int GPSweek, double GPSweeks, const QString&, 
-                     const ColumnVector&) {
+                     const ColumnVector&, bool append) {
 
   if (_sampl != 0 && fmod(GPSweeks, _sampl) != 0.0) {
@@ -158,6 +158,5 @@
     _out.setf(ios::showpoint | ios::fixed);
     bnsSettings settings;
-    if (QFile::exists(_fName) &&
-        Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) {
+    if (append && QFile::exists(_fName)) {
       _out.open(_fName.data(), ios::out | ios::app);
     }
Index: /trunk/BNS/bnsoutf.h
===================================================================
--- /trunk/BNS/bnsoutf.h	(revision 3040)
+++ /trunk/BNS/bnsoutf.h	(revision 3041)
@@ -15,5 +15,5 @@
 
   virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 
-                      const ColumnVector& xx);
+                      const ColumnVector& xx, bool append);
 
  protected:
Index: /trunk/BNS/bnsrinex.cpp
===================================================================
--- /trunk/BNS/bnsrinex.cpp	(revision 3040)
+++ /trunk/BNS/bnsrinex.cpp	(revision 3041)
@@ -20,4 +20,5 @@
 
 #include "bnsrinex.h"
+#include "bnssettings.h"
 
 using namespace std;
@@ -28,4 +29,6 @@
                const QString& intr, int sampl) 
   : bnsoutf(prep, ext, path, intr, sampl) {
+  bnsSettings settings;
+  _append = Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked;
 }
 
@@ -40,5 +43,5 @@
                    const ColumnVector& xx) {
 
-  if (bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) {
+  if (bnsoutf::write(GPSweek, GPSweeks, prn, xx, _append) == success) {
 
       QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
Index: /trunk/BNS/bnsrinex.h
===================================================================
--- /trunk/BNS/bnsrinex.h	(revision 3040)
+++ /trunk/BNS/bnsrinex.h	(revision 3041)
@@ -18,4 +18,5 @@
  private:
   virtual void writeHeader(const QDateTime& datTim);
+  bool _append;
 };
 
Index: /trunk/BNS/bnssp3.cpp
===================================================================
--- /trunk/BNS/bnssp3.cpp	(revision 3040)
+++ /trunk/BNS/bnssp3.cpp	(revision 3041)
@@ -42,7 +42,7 @@
 ////////////////////////////////////////////////////////////////////////////
 t_irc bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn, 
-                   const ColumnVector& xx) {
+                    const ColumnVector& xx, bool append) {
 
-  if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) {
+  if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx, append) == success) {
 
     if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) {
Index: /trunk/BNS/bnssp3.h
===================================================================
--- /trunk/BNS/bnssp3.h	(revision 3040)
+++ /trunk/BNS/bnssp3.h	(revision 3041)
@@ -14,5 +14,5 @@
   virtual ~bnsSP3();
   virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 
-                      const ColumnVector& xx);
+                      const ColumnVector& xx, bool append);
 
  private:
