I am writing text to the file, but it is not saved, for the test, I decided to read it as a next step, and suddenly the text is displayed, but the file did not change after the program was completed, wherever I used the file using the file, so all streams are closed! Also I wanted to ask why I edit the text file in VS 2017 itself, the changes are not saved (if you just open the file on the desktop). Below are all the screens: 
Here begins the incomprehensible, in the text file recorded "test" (screen below), after clicking, recording and output from the file. I tried to change the properties of the file, but did not help 



