in reply to How to print a report to file
If you explicitly return a success value from process_dir(), you could check for success or failure within your while loop and log there.