public void netStopped(NeuralNetEvent e) {
    	System.out.println("Training finished");
    	// store the training values.
    	try {
			PrintWriter w = new PrintWriter("./log/errors_" + errors[20]+".log", "UTF-8");
			for(int i = 0; i < count; i++)
	    	{
				w.write(errors[i]+";");
	    	}
			// done writing, close.
			w.close();
		} catch (FileNotFoundException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} catch (UnsupportedEncodingException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
    	p.trainingDone = true;
    }