Added a check for empty dataDict in dataSub, and dataPrint