Additional patches in lusolmain.c to output a return code