changed debug logging