Converted prepareArgs from errmsg to name