For now please DO NOT run your script.

Copy the script EXACTLY as I have it to see if it works for you. THEN we can work on actually logging the results.
 
Just copy the latest script I posted and run it (assuming your text file is there where you run the script from)