added additional logging when saving preferences