handling error on loading config