path finder works correctly and stops when cavern is found