I use a variation from this link that logs it to the same file. instead of just a "started" and "ended" value it also plugs in a "Program Run" time and then a "Program Completed". If it doesn't reach the end of my measurable features it will throw in an "Incomplete Run-Possible Crash" with a time. That displays a pop-up with the text "Program Error - Did the Machine Crash? Yes/No. I have it all logged including their answer. If I find out they lied, it's not my problem.
I use a variation from this link that logs it to the same file. instead of just a "started" and "ended" value it also plugs in a "Program Run" time and then a "Program Completed". If it doesn't reach the end of my measurable features it will throw in an "Incomplete Run-Possible Crash" with a time. That displays a pop-up with the text "Program Error - Did the Machine Crash? Yes/No. I have it all logged including their answer. If I find out they lied, it's not my problem.