Adding debug info and log file output.

Realized that I had no way of knowing if the program was actually
working at all, so I'm making it record every step.