+ }else {
+ ofstream outNewLog;
+ openOutputFileAppend(newlogFileName, outNewLog);
+ outNewLog << endl << endl << "*********************************************************************************" << endl << endl;
+ outNewLog.close();
+
+ appendFiles(logFileName, newlogFileName);
+ remove(logFileName.c_str());
+ }
+ }else{
+ newlogFileName = outputDir + logFileName;
+ //need this because m->mothurOut makes the logfile, but doesn't know where to put it
+ rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp
+ }
+
+
+ delete mothur;
+
+ #ifdef USE_MPI
+ MPI_Finalize();
+ #endif
+