Open config file with mode r+.
Open config file with mode r+.

Otherwise, we won't be able to read the file before writing to it, which causes
issues with maintaining existing contents of the file.

kmc/kmc,kmc/kmc,kmc/kmc