private void logOutput() throws VehicleException, SimulationException, IOException {
		// reset text area
		logText.setText("");
		Log log = new Log();
		// update log
        if(valid()){
        	log.initialEntry(cp, s);
			for (int time=0; time<=Constants.CLOSING_TIME; time++) {
				//queue elements exceed max waiting time
				if (!cp.queueEmpty()) {
					cp.archiveQueueFailures(time);
				}
				//vehicles whose time has expired
				if (!cp.carParkEmpty()) {
					//force exit at closing time, otherwise normal
					boolean force = (time == Constants.CLOSING_TIME);
					cp.archiveDepartingVehicles(time, force);
				}
				//attempt to clear the queue 
				if (!cp.carParkFull()) {
					cp.processQueue(time,s);
				}
				// new vehicles from minute 1 until the last hour
				if (newVehiclesAllowed(time)) { 
					cp.tryProcessNewVehicles(time,s);
				}
				String status = cp.getStatus(time);
				log.writer.write(status);
				logText.append(status); 
		
			}
			log.finalise(cp);
        }
	}