- use stdbuf to unbuffer, write handle tweaks