UnitDefs: print the error message when unitdef creation fails