Creating error handlers using Exit sub function