Add error handling code which validates config file and needed parameters from the config file