Another fix for logging UPNP errors closes #2009