public static synchronized void onFinish(Chunk chunk) {
		finishedChunks++;
		int p = (int) ((finishedChunks / totalChunks) * 100);
		
		if (percent != p) {
			percent = p;

			if (prints++ == 8) {
				prints = 0;
				System.out.println();
			}

			System.out.print("\t" + p + "%");

			if (finishedChunks == totalChunks) {
				synchronized (lock) {
					lock.notifyAll();
				}
				
				if(percent == 100)
					System.out.println();
				
				finishedChunks = 0;
				percent = -1;
				prints = -1;
			}
		}
	}