Don't md5sum twice. Mention if there was an error calculating checksums for a buffer. Add more logging to on_patch.