[S390] monwriter: fix return code handling