Sync with Fritz

Sorry for the monster pull request ... will use branches now.
use log facility for debug output