Closing resources in appender and tailer