minor improvement: only use a single instance of the tail command for multiple files