LOG_EVERY_N for put/put_raw; added ~TransportLayer to shutdown sockets and avoid potential crashes.