It may be worthwhile testing to ensure that, in the event of a crash, your log entries have been saved to the log file. This is because the text may not be flushed from memory to disk until the line
executes, or the memory buffer is full.
A simple way to test is to write an applet which fails to call tempfile.Close.
It may be worth also looking at function Utilities.Trace which is documented in the Formativ Language Guide. This is particularly useful for debugging an applet with the help of an external debug event viewer.