Replaced sys.exit() with exit()