Ensure that tail and grep terminate as well