longest path finder handles broken generators gracefully