set thread count, destroy TransferManager when app is done.