diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java
index 7612ca2..0d50bbf 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java
@@ -304,6 +304,26 @@
         }
         patternList.addAll(createRemoveAsterixLogDirPattern(instance).getPattern());
         patternList.addAll(createRemoveAsterixRootMetadata(instance).getPattern());
+        patternList.addAll(createRemoveAsterixTxnLogs(instance).getPattern());
+        Patterns patterns = new Patterns(patternList);
+        return patterns;
+    }
+
+    private Patterns createRemoveAsterixTxnLogs(AsterixInstance instance) throws Exception {
+        List<Pattern> patternList = new ArrayList<Pattern>();
+        Cluster cluster = instance.getCluster();
+        Nodeid nodeid = null;
+        String pargs = null;
+        Event event = null;
+        for (Node node : cluster.getNode()) {
+            String iodevices = node.getIodevices() == null ? cluster.getIodevices() : node.getIodevices();
+            String primaryIODevice = iodevices.split(",")[0].trim();
+            pargs = primaryIODevice + File.separator + InstallerUtil.TXN_LOG_DIR;
+            nodeid = new Nodeid(new Value(null, node.getId()));
+            event = new Event("file_delete", nodeid, pargs);
+            patternList.add(new Pattern(null, 1, null, event));
+        }
+
         Patterns patterns = new Patterns(patternList);
         return patterns;
     }
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
index 9f8b28d..9a2d43d 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
@@ -25,159 +25,158 @@
 
 public class AsterixInstance implements Serializable {
 
-	private static final long serialVersionUID = 2874439550187520449L;
+    private static final long serialVersionUID = 2874439550187520449L;
 
-	public enum State {
-		ACTIVE, INACTIVE, UNUSABLE
-	}
+    public enum State {
+        ACTIVE,
+        INACTIVE,
+        UNUSABLE
+    }
 
-	private final Cluster cluster;
-	private final String name;
-	private final Date createdTimestamp;
-	private Date stateChangeTimestamp;
-	private Date modifiedTimestamp;
-	private Properties configuration;
-	private State state;
-	private final String metadataNodeId;
-	private final String asterixVersion;
-	private final List<BackupInfo> backupInfo;
-	private final String webInterfaceUrl;
-	private AsterixRuntimeState runtimeState;
-	private State previousState;
+    private final Cluster cluster;
+    private final String name;
+    private final Date createdTimestamp;
+    private Date stateChangeTimestamp;
+    private Date modifiedTimestamp;
+    private Properties configuration;
+    private State state;
+    private final String metadataNodeId;
+    private final String asterixVersion;
+    private final List<BackupInfo> backupInfo;
+    private final String webInterfaceUrl;
+    private AsterixRuntimeState runtimeState;
+    private State previousState;
 
-	public AsterixInstance(String name, Cluster cluster,
-			Properties configuration, String metadataNodeId,
-			String asterixVersion) {
-		this.name = name;
-		this.cluster = cluster;
-		this.configuration = configuration;
-		this.metadataNodeId = metadataNodeId;
-		this.state = State.ACTIVE;
-		this.previousState = State.UNUSABLE;
-		this.asterixVersion = asterixVersion;
-		this.createdTimestamp = new Date();
-		this.backupInfo = new ArrayList<BackupInfo>();
-		this.webInterfaceUrl = "http://"
-				+ cluster.getMasterNode().getClusterIp() + ":" + 19001;
-	}
+    public AsterixInstance(String name, Cluster cluster, Properties configuration, String metadataNodeId,
+            String asterixVersion) {
+        this.name = name;
+        this.cluster = cluster;
+        this.configuration = configuration;
+        this.metadataNodeId = metadataNodeId;
+        this.state = State.ACTIVE;
+        this.previousState = State.UNUSABLE;
+        this.asterixVersion = asterixVersion;
+        this.createdTimestamp = new Date();
+        this.backupInfo = new ArrayList<BackupInfo>();
+        this.webInterfaceUrl = "http://" + cluster.getMasterNode().getClientIp() + ":" + 19001;
+    }
 
-	public Date getModifiedTimestamp() {
-		return stateChangeTimestamp;
-	}
+    public Date getModifiedTimestamp() {
+        return stateChangeTimestamp;
+    }
 
-	public Properties getConfiguration() {
-		return configuration;
-	}
+    public Properties getConfiguration() {
+        return configuration;
+    }
 
-	public void setConfiguration(Properties properties) {
-		this.configuration = properties;
-	}
+    public void setConfiguration(Properties properties) {
+        this.configuration = properties;
+    }
 
-	public State getState() {
-		return state;
-	}
+    public State getState() {
+        return state;
+    }
 
-	public void setState(State state) {
-		this.previousState = this.state;
-		this.state = state;
-	}
+    public void setState(State state) {
+        this.previousState = this.state;
+        this.state = state;
+    }
 
-	public Cluster getCluster() {
-		return cluster;
-	}
+    public Cluster getCluster() {
+        return cluster;
+    }
 
-	public String getName() {
-		return name;
-	}
+    public String getName() {
+        return name;
+    }
 
-	public Date getCreatedTimestamp() {
-		return createdTimestamp;
-	}
+    public Date getCreatedTimestamp() {
+        return createdTimestamp;
+    }
 
-	public Date getStateChangeTimestamp() {
-		return stateChangeTimestamp;
-	}
+    public Date getStateChangeTimestamp() {
+        return stateChangeTimestamp;
+    }
 
-	public void setStateChangeTimestamp(Date stateChangeTimestamp) {
-		this.stateChangeTimestamp = stateChangeTimestamp;
-	}
+    public void setStateChangeTimestamp(Date stateChangeTimestamp) {
+        this.stateChangeTimestamp = stateChangeTimestamp;
+    }
 
-	public void setModifiedTimestamp(Date modifiedTimestamp) {
-		this.modifiedTimestamp = modifiedTimestamp;
-	}
+    public void setModifiedTimestamp(Date modifiedTimestamp) {
+        this.modifiedTimestamp = modifiedTimestamp;
+    }
 
-	public String getMetadataNodeId() {
-		return metadataNodeId;
-	}
+    public String getMetadataNodeId() {
+        return metadataNodeId;
+    }
 
-	public String getAsterixVersion() {
-		return asterixVersion;
-	}
+    public String getAsterixVersion() {
+        return asterixVersion;
+    }
 
-	public String getDescription(boolean detailed) {
-		StringBuffer buffer = new StringBuffer();
-		buffer.append("Name:" + name + "\n");
-		buffer.append("Created:" + createdTimestamp + "\n");
-		buffer.append("Web-Url:" + webInterfaceUrl + "\n");
-		buffer.append("State:" + state);
-		if (!state.equals(State.UNUSABLE) && stateChangeTimestamp != null) {
-			buffer.append(" (" + stateChangeTimestamp + ")" + "\n");
-		} else {
-			buffer.append("\n");
-		}
-		if (modifiedTimestamp != null) {
-			buffer.append("Last modified timestamp:" + modifiedTimestamp + "\n");
-		}
+    public String getDescription(boolean detailed) {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("Name:" + name + "\n");
+        buffer.append("Created:" + createdTimestamp + "\n");
+        buffer.append("Web-Url:" + webInterfaceUrl + "\n");
+        buffer.append("State:" + state);
+        if (!state.equals(State.UNUSABLE) && stateChangeTimestamp != null) {
+            buffer.append(" (" + stateChangeTimestamp + ")" + "\n");
+        } else {
+            buffer.append("\n");
+        }
+        if (modifiedTimestamp != null) {
+            buffer.append("Last modified timestamp:" + modifiedTimestamp + "\n");
+        }
 
-		if (runtimeState.getSummary() != null
-				&& runtimeState.getSummary().length() > 0) {
-			buffer.append("\nWARNING!:" + runtimeState.getSummary() + "\n");
-		}
-		if (detailed) {
-			addDetailedInformation(buffer);
-		}
-		return buffer.toString();
-	}
+        if (runtimeState.getSummary() != null && runtimeState.getSummary().length() > 0) {
+            buffer.append("\nWARNING!:" + runtimeState.getSummary() + "\n");
+        }
+        if (detailed) {
+            addDetailedInformation(buffer);
+        }
+        return buffer.toString();
+    }
 
-	public List<BackupInfo> getBackupInfo() {
-		return backupInfo;
-	}
+    public List<BackupInfo> getBackupInfo() {
+        return backupInfo;
+    }
 
-	public String getWebInterfaceUrl() {
-		return webInterfaceUrl;
-	}
+    public String getWebInterfaceUrl() {
+        return webInterfaceUrl;
+    }
 
-	public AsterixRuntimeState getAsterixRuntimeState() {
-		return runtimeState;
-	}
+    public AsterixRuntimeState getAsterixRuntimeState() {
+        return runtimeState;
+    }
 
-	public void setAsterixRuntimeStates(AsterixRuntimeState runtimeState) {
-		this.runtimeState = runtimeState;
-	}
+    public void setAsterixRuntimeStates(AsterixRuntimeState runtimeState) {
+        this.runtimeState = runtimeState;
+    }
 
-	private void addDetailedInformation(StringBuffer buffer) {
-		buffer.append("Master node:" + cluster.getMasterNode().getId() + ":"
-				+ cluster.getMasterNode().getClusterIp() + "\n");
-		for (Node node : cluster.getNode()) {
-			buffer.append(node.getId() + ":" + node.getClusterIp() + "\n");
-		}
+    private void addDetailedInformation(StringBuffer buffer) {
+        buffer.append("Master node:" + cluster.getMasterNode().getId() + ":" + cluster.getMasterNode().getClusterIp()
+                + "\n");
+        for (Node node : cluster.getNode()) {
+            buffer.append(node.getId() + ":" + node.getClusterIp() + "\n");
+        }
 
-		if (backupInfo != null && backupInfo.size() > 0) {
-			for (BackupInfo info : backupInfo) {
-				buffer.append(info + "\n");
-			}
-		}
-		buffer.append("\n");
-		buffer.append("Asterix version:" + asterixVersion + "\n");
-		buffer.append("Metadata Node:" + metadataNodeId + "\n");
-		buffer.append("Processes" + "\n");
-		for (ProcessInfo pInfo : runtimeState.getProcesses()) {
-			buffer.append(pInfo + "\n");
-		}
+        if (backupInfo != null && backupInfo.size() > 0) {
+            for (BackupInfo info : backupInfo) {
+                buffer.append(info + "\n");
+            }
+        }
+        buffer.append("\n");
+        buffer.append("Asterix version:" + asterixVersion + "\n");
+        buffer.append("Metadata Node:" + metadataNodeId + "\n");
+        buffer.append("Processes" + "\n");
+        for (ProcessInfo pInfo : runtimeState.getProcesses()) {
+            buffer.append(pInfo + "\n");
+        }
 
-	}
+    }
 
-	public State getPreviousState() {
-		return previousState;
-	}
+    public State getPreviousState() {
+        return previousState;
+    }
 }
diff --git a/asterix-installer/src/main/resources/scripts/validate_ssh.sh b/asterix-installer/src/main/resources/scripts/validate_ssh.sh
index f6dfed9..de6d79c 100755
--- a/asterix-installer/src/main/resources/scripts/validate_ssh.sh
+++ b/asterix-installer/src/main/resources/scripts/validate_ssh.sh
@@ -1,7 +1,7 @@
 USERNAME=$1
 shift 1
 numargs=$#
-for ((i=1 ; i <= numargs ; i=i+2))
+for ((i=1 ; i <= numargs ; i=i+1))
 do
  host=$1
  ssh -l $USERNAME -oNumberOfPasswordPrompts=0 $host "echo $host"
