Moved the writing of the tracker.dat to main().