Added support for Einarc document location defined in configuration; adapted for webgen-0.5; added some safety checks