for hadoop, converted outputstream to a big string