Merge "fix the bug that mWriteStream is deleted twice."