Added check so that attributes are not set to the object unless they are defined in data file