refactored file appender out