Quality control in bakery products