make write count static (prepare for dtrace instrumentation), test to make sure tcp handle is not null (usually null if http.cc isn't included in the build