sys.argv[1] does not always exist. Handle it appropriately