add support for custom stdout and stderr