AddLineToFile is a private function. Add it to the object it is used in.