Added MockStreamWriter to handle the OpenWrite