improve config read from outside