Adding support for writing config file.