detect abnormal when call on function