Make output stream customizable