improved config load