Added the code to introduce a delay, and to write the log file to disk