debug logging clean up