method LoadConfig returns an error instead of panics