Added disconnect logic to example