close log files before trying to delete them
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java
index 5b10144..f037521 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java
@@ -604,6 +604,7 @@
     }
 
     public void renewLogFiles() throws ACIDException {
+    	closeLogPages();
         List<String> logFileNames = LogUtil.getLogFiles(logManagerProperties);
         for (String name : logFileNames) {
             File file = new File(LogUtil.getLogFilePath(logManagerProperties, Long.parseLong(name)));
@@ -611,7 +612,6 @@
                 throw new ACIDException("Failed to delete a file: " + name);
             }
         }
-        closeLogPages();
         initLSN();
         openLogPages();
         logPageFlusher.renew();