improve sys.write, can accept other type