Removed redundantcy.

Import sys was imported in a redundant manner. It's better to import it once and then call sys.exit() when needed.