read a cfg