Refined TextFile class.