Refactored BufferedLogWriter