Since I changed sleep() of protect part from 0.01 to 0.1, it had not happened for several days. But it occurred once more. It is the main problem now.