public void startLog(){

	try{

	    if(!_logEnabled){
		int result = _logFileChooser.showDialog(null, "Log file");
		if(result == JFileChooser.APPROVE_OPTION){
		    _logFile = _logFileChooser.getSelectedFile();
		    if (_logFile.getPath().indexOf(".html") != _logFile.getPath().length() - 5 ){
			String newFilePath = _logFile.getPath() + ".html";
			_logFile = new File(newFilePath);
		    }
		    
		    Date       date = new Date();
		    DateFormat df   = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
		    
		    // Write, appending to end
		    if(_logFile.exists()){
			add("Will append to <strong>" + _logFile.getName() + "</strong>", OK, false);
			_logFileWriter = new FileWriter(_logFile, true);		    
		    }else{
			_logFileWriter = new FileWriter(_logFile, true);
			_logFileWriter.write("<html>\n<body>\n<h1>Udriver log file</h1>\n\n<p>\n<table>\n");
		    }
	    
		    _logEnabled = true;
		    add("Started logging to <strong>" + _logFile.getName() + "</strong>", OK, true);
		    
		}else{
		    add("No log file chosen; file logging disabled", WARNING, false);
		    _logEnabled = false;
		}
	    }else{
		add("File logging already started.", WARNING, false);
		System.out.println("You must first stop logging if you want to start it with another name");
	    }
	}
	catch(Exception e){
	    _close();
	    add(e.toString() + ". File logging disabled", WARNING, false);
	}
    }