all use outputstream as per beetl author's suggestion