Its better to raise Errors than go for sys.exit. Any reason why you had done it that way?