Added function to update completed step stats.