Logging changes
I used the logging module to print debug messages to stderr so you can pipe the final results to a file without parsing