Add error handlings in yicesl and improve comments