Exit gracefully in case of error

And don't kill XBMC :-)
version 2.2.1