correctly catch ts.close() exception