fix build, add log env. variable.
updated to work with MD/XS 4.0 API.