packet writer is now isolated and thread safe