support standard io stream