Minor fixes to debug logs of apply_role