modification following Marty suggestions. It still seems like the exit() is not taken in acount at line 102 and it drives me nuts