put a paranoid try/except around all extra code logging code in the monkey patch