Create config folder first before writing into it.