Config writing helper