Added GenerateEnding function in ProgressTracker