adjusted notification call to new API.
checking if pref directory is present
added some debug output