Switching away from os.system in _gs