chg: better error check and debug stuff for newstruct/blackbox

from spielwiese
fix: assign of derived newstructs