added the exception handling stuff with libconfig