Many people use .NET framework library without reading documentation. Sometimes, it just like taking medicine without reading its label. Today, I found that there is a piece of code trying to read AssemblyInfo.cs and change the version of the .NET assembly based on the input. The code seems to work quite well for most of the files except for certain files. In each of those files, there is an extra "]" at the end. It took a while to see that it's using FileMode.OpenOrCreate instead of FileMode.Create. This will cause the FileStream to open that file at position 0 but it will keep the rest of the file intact. Therefore, if the program overwrite the file with shorter content, you will still see some of the old content at the end of the file!