Adapted to read config from file (it fails if file doesn't exists)