Add logging to patch.py

to help debug checksum failures