One way to fix the problem is to let your editor or AppleScript take care of the compiler running, and even display if the output is going to be small. However, if you're trying to read the log from a larger program's execution, you may want to try opening the log file with Console.app. You won't accidentaly edit the output, and when you run your test, Console.app automatically figures out that the file has been updated and reloads it.
BTW, these file can be any kind of plain text file (not just ones with the ".log" extension).

