log4j instead of stdout/stderr, NPE fix in case of not specified base directory