new debug macro for verbose output
use getsockname to find local port for debug output