Updated Confighandler with some error handling

Confighandler should now handle more errors, might need to go through
flow once more