better debug log for network; fix a bug for httpd