Add path reconstruct code.