private void appendChatLog(String text) {
        try {
            SimpleDateFormat dt = new SimpleDateFormat("yyyy-MM-dd");
            String logName = dt.format(new Date());
            
            // Path format: gameDir/chatlogs/yyyy-mm-dd.log
            String logPath = ConfigManager.getInstance().chatlogsDir + File.separatorChar + logName + ".log";

            // Append text with line ending
            text += "\n";
            
            // Append data to file. If file doesn't exists, create new
            File logFile = new File(logPath);
            if (!logFile.exists()) {
                new File(new File(logPath).getParent()).mkdirs();
                
                if (!logFile.createNewFile()){
                    return;
                }
            }

            Files.write(Paths.get(logPath), text.getBytes("UTF-8"),StandardOpenOption.APPEND);
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }