Normally problems with the log file are caused when the engine is not yet terminated when opening the log file.

The engine opens the log file for writing. When you open it in a text editor, it opens the file for writing also. This gives a conflict under Windows.

It can also happen when the engine does not close properly, but crashes, that the log file stays open. In this case you can only read it, f.i. with a text viewer, but not open it in an editor. This case is resolved by restarting Windows.