improve network trace logging

fixes #507