add end flag file