More explicit code dealing with writing configuration file