printing path after convergence works perfectly