I have a function called fMsg() that I use for all logging. Latest version is in the Kix library of my web site. It can display on screen, file, or both, timestamps the log data, and can even suppress output unless $DEBUG is true for dynamic debugging messages.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D