Improve error handling by xcf
This commit introduces further handling of errors and error results bin xcf library. It also disables one more exit() - although it shouldn't be used anywhere.