add logging
add some debug logging