loadData function

Load data from supplied config