File tailer refactoring