change plugin - adding rescue procedure

when it has been occurring "closed stream" error in in_tail plugin, it can not stop that error and looping error.
so, I compare your source with in_tail plugin.
and your source  doesn't have rescue procedure. 
could you please add this source ?