tail: make tail() use a callback to be independent of bot