Fixed preference child saving, added api call to remove preference directory
new debug message.