Yes, I changed that function/method. I added file_put_contents in saveEmail function at some places, after that when I run It gives me above output.
When function executes, it will store 1 2 3 incrementally after some line of code executions. So It should go to 10 to successfully insert email address. So when my logic hook fire, It calls saveEmail function 3 times. first 2 to 5 than 2 to 10 and then 2 to 5.
So, it saves email ID and remove it.