fix format
let configure your own output handler
ensure vars is created by context and removed with it
define a flush handler as stdout, file descriptor or closure