private synchronized void writeLog(String message) throws Exception {

        try {
            bw.write(message);
            bw.newLine();
            bw.flush();
        } catch (Exception e) {
            throw new Exception(e.getMessage());
        }
    }