public void doLog(String log) {
 		if(appState == STARTED) {
 			try {
 			StyledDocument sDoc = logMessagesDisp.getStyledDocument();
 			if(!logBuffer.isEmpty()) {
 				Iterator iter = logBuffer.iterator();
 				while(iter.hasNext()) {
 					sDoc.insertString(sDoc.getLength(), (String)iter.next(), sDoc.getStyle(STYLE_REGULAR));			
 					iter.remove();
 				}
 			}			
 			sDoc.insertString(sDoc.getLength(), log, sDoc.getStyle(STYLE_REGULAR));
 			} catch(BadLocationException ble) {
 				System.out.println("Bad Location Exception : " + ble.getMessage());
 			}
 		}
 		else if(appState == PAUSED){
 			logBuffer.add(log);
 		}
 	}