add call to memerr in case mchk was due to memory problem