Better UPNP logging. Also fixes a compile error