move ip parsing into validation function, export LoadConfig