updated error reporting for structures