Encapsulate all callback in try/except clauses with logging.
Fix AttributeError in permissions.py