There are many posts on using UDF for checking and waiting for open file handles to write a central .INI or LOG file, but my personal preference is to have each user write their own log file to a central share location and then I copy all of them into a single file and import with Excel for reporting.

COPY *.TXT SYSINFO.TXT

There is never any file contention or script waiting. The process can be fully automated by script as well.