changed name of consoleAppender to writerAppender and added lock