@Override
        public void run() {
            //try {
                if(!messages.isEmpty() && connection != null) {
                    try {
                        PreparedStatement messageInsertStatement = connection.prepareStatement(
                                "INSERT INTO BlackBoxMessages(timestamp, message)"
                                    + "values (?,?)");
                        messageInsertStatement.setString(1, String.valueOf(currenttimestamp));
                        messageInsertStatement.setString(2, messages.remove(0));
                        messageInsertStatement.executeUpdate();
                        messageInsertStatement.close();
                    } catch (SQLException ex) {
                        System.out.println(ex.getMessage());
                        Logger.getLogger(BlackBoxLogger.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    //System.out.println(messages.get(0));
                }
                //wait();
            //} catch (InterruptedException ex) {
            //    Logger.getLogger(BlackBoxLogger.class.getName()).log(Level.SEVERE, null, ex);
            //}
        }