fixed TextFile usage