fix proper way of reading config file