use os.name instead of sys.platform