Add text api interface
Clean up after error