bugfixes in network code, and some logging stuff;
fixed Bencode