Create do-while-Funktion(Puffer cleaning)