Unify opening of config file