Added path validity checking to PathFinder