close stats file