more logging
new version with more logging