Changed location of errorstatus, fixed KNO writing and reduced output array size