check for empty barcodelist before writing