Longest path and DFS in seperate file