Wrapped disconnet in try catch to avoid not connected errors