improved config file loading and logging