handle errors in calling nxm2txt