config: read config file before writing

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>