adding debug statements to write.c mgmt err