Added memory allocation failure exception in stream