make debug logging better