Rather than using a load failure to indicate the end of the path, I think it would be better to have a proper END_OF_PATH sentinel.  That would allow you to distinguish between a real load failure and an actual complete load of a path.