Add abandonflag and when should wait for human

Add abandonflag and when should wait for human