Fix saving settings, and logging configuration