Use sed in unbuffered mode instead of tail. Otherwise, all the latest output
is lost on Ctrl-C.