putw is supposed to return 0 (not the value written) on success