Modifying logic to loop through dmesgs to fix incrementing error