Replace explicit sleep bool with a flag