improved logging on event listener