Result file commit.
Speed up if the first result is infinite (=no other path found).