Updated to (possibly) convert stream to string.