using io.ReadWriter https://github.com/Clever/batchtail/commit/d0a49204debf092b2580e9a89e07fa127facfffc