Fix bounded outputstream to not raise an exception