improved logging
fixes #40
fixes #42