Wrong usage of config writing api fixed.