Fix crash when debug is enabled
Fix crash when debug is enabled

- If the error or info log files can not be created, use stderr and
  stdout instead.

mrjimenez/pupnp,mrjimenez/pupnp,mrjimenez/pupnp,mrjimenez/pupnp