better debug info
set hostname correctly
fix counter