add nwlogging to replace nslog and nsassert