private static boolean outputLog() {
		FileWriter outputFile = null;
		BufferedWriter outputBuf = null;
		String logID = Long.toString(new Date().getTime());
		char txnLength = 'M';
		if (minOperations < 15) {
			txnLength = 'S';
		}
		else if (maxOperations > 30) {
			txnLength = 'L';
		}
		logID = "" + proof.charAt(0) + validationMode + policyPush + txnLength + logID.substring(3);
		String filename = "Log_" + logID + ".txt";
		boolean success = true;
		long avgFullTxn = 0l; // Start to finish
		long avgTxnTime = 0l; // Reads and writes only
		long avgCommitTime = 0l; // From commit call to finish
		
		// Create an output stream
		try {			
			outputFile = new FileWriter(filename, true);
			// create a BufferedWriter object for the output methods
			outputBuf = new BufferedWriter(outputFile);
		}
		catch(IOException ioe) {
			System.out.println("IOException during output file creation.");
			ioe.printStackTrace();
			success = false;
		}
		
		// Write to file
		try {
			outputBuf.write("PARAMETERS:");
			outputBuf.newLine();
			outputBuf.write("PROOF=" + proof);
			outputBuf.newLine();
			outputBuf.write("VM=" + validationMode);
			outputBuf.newLine();
			outputBuf.write("PUSH=" + policyPush);
			outputBuf.newLine();
			outputBuf.write("MT=" + maxTransactions);
			outputBuf.newLine();
			outputBuf.write("OPMIN=" + minOperations);
			outputBuf.newLine();
			outputBuf.write("OPMAX=" + maxOperations);
			outputBuf.newLine();
			outputBuf.write("MS=" + maxServers);
			outputBuf.newLine();
			outputBuf.write("MD=" + maxDegree);
			outputBuf.newLine();
			outputBuf.write("LMIN=" + latencyMin);
			outputBuf.newLine();
			outputBuf.write("LMAX=" + latencyMax);
			outputBuf.newLine();
			outputBuf.write("SLEEP=" + threadSleep);
			outputBuf.newLine();
			outputBuf.write("ICSR=" + integrityCheckSuccessRate);
			outputBuf.newLine();
			outputBuf.write("LASR=" + localAuthSuccessRate);
			outputBuf.newLine();
			outputBuf.write("PMIN=" + policyUpdateMin);
			outputBuf.newLine();
			outputBuf.write("PMAX=" + policyUpdateMax);
			outputBuf.newLine();
			outputBuf.write("RS1=" + randomSeed1);
			outputBuf.newLine();
			outputBuf.write("RS2=" + randomSeed2);
			outputBuf.newLine();
			outputBuf.write("RS3=" + randomSeed3);
			outputBuf.newLine();

			/*** Output metrics ***/
			// Total time of run
			outputBuf.write("Total Time=" +
							(TransactionLog.entry.get(maxTransactions).getEndTime() - TransactionLog.entry.get(1).getStartTime()));
			outputBuf.newLine();
			// Calculate averages
			for (int i = 1; i <= maxTransactions; i++) {
				avgFullTxn += TransactionLog.entry.get(i).getDuration();
				avgTxnTime += TransactionLog.entry.get(i).getTxnTime();
				avgCommitTime += TransactionLog.entry.get(i).getCommitTime();
			}
			outputBuf.write("Avg Full Txn Time=" + (avgFullTxn / maxTransactions));
			outputBuf.newLine();
			outputBuf.write("Avg Txn Time=" + (avgTxnTime / maxTransactions));
			outputBuf.newLine();
			outputBuf.write("Avg Commit Time=" + (avgCommitTime / maxTransactions));
			outputBuf.newLine();
			// Full data output
			if (threadSleep) {
				for (int i = 1; i <= maxTransactions; i++) {
					outputBuf.write(TransactionLog.entry.get(i).getTxnNumber() + "\t" +
									TransactionLog.entry.get(i).getTxn() + "\t" +
									TransactionLog.entry.get(i).getStartTime() + "\t" +
									TransactionLog.entry.get(i).getCommitStartTime() + "\t" +
									TransactionLog.entry.get(i).getEndTime() + "\t" +
									TransactionLog.entry.get(i).getDuration() + "\t" +
									TransactionLog.entry.get(i).getTxnTime() + "\t" +
									TransactionLog.entry.get(i).getCommitTime() + "\t" +
									TransactionLog.entry.get(i).getStatus());
					outputBuf.newLine();
				}
			}
			else { // output sleep time in data
				for (int i = 1; i <= maxTransactions; i++) {
					outputBuf.write(TransactionLog.entry.get(i).getTxnNumber() + "\t" +
									TransactionLog.entry.get(i).getTxn() + "\t" +
									TransactionLog.entry.get(i).getStartTime() + "\t" +
									TransactionLog.entry.get(i).getCommitStartTime() + "\t" +
									TransactionLog.entry.get(i).getEndTime() + "\t" +
									TransactionLog.entry.get(i).getDuration() + "\t" +
									TransactionLog.entry.get(i).getTxnTime() + "\t" +
									TransactionLog.entry.get(i).getCommitTime() + "\t" +
									TransactionLog.entry.get(i).getSleepTime() + "\t" +
									TransactionLog.entry.get(i).getStatus());
					outputBuf.newLine();
				}
			}
		}
		catch(IOException ioe) {
			System.out.println("IOException while writing to output file.");
			ioe.printStackTrace();
			success = false;
		}
		
		// Close the output stream
		try {
			outputBuf.close();
		}
		catch(IOException ioe) {
			System.out.println("IOException while closing the output file.");
			ioe.printStackTrace();
			success = false;
		}
		
		return success;
	}