Use write for toString