Added puterror in misc.c