finally fixed the timeout problem

+ added some pieces of code for win32
+ added automated pings after 30 seconds of idling
* activated logging