provide stream instead of just writer
add title into output