to add buf check as the detour input