Updated prepareArgs from errmsg to name