make debug logging a bit more efficient; remove deprecated safe=True arg...

...s