fix error handling code, syn to new Lumen