Made the ICAT host configurable and improved robustness.

The ICAT host can be configured with the init function.
All exceptions are caught inside the index-entry function and written to
standard output.