Add logging to ban function.