refactor (move conditional pre channel write)