Adding more error checking on config