separate template iostream utils