Output buffer cleared after every iteration