LPS-49690 Update usage of CaptureHandler.close()