Added safe logging to top level moj js object