Add logging to rule-based bind function