Correctly parsing and creating config file.