In reply to David Logan. Thank you, David, for your feedback. You made a good point by embedding 'ok' or 'error' into the log name which facilitates logs inspection by just looking at the directory contents. And I agree, scripting are quite mundane and in many cases should be automated. That's why I wrote this blog post. Personally, I would rather use the following naming convention: <programname>_<timestamp>_ok.log and <programname>_<timestamp>_error.log to group logs by programname, and also preserve the '.log' file extension.