Fixed issue #11 added writing functional for settings