fix #2367: more intelligent initial logtype
fix #2385: relative links in OC caches lead to crash
refactoring: use exception object in loggging