Refactor to use packet queue channel for writes