added some more debug logging for clearer picture