static void write(String cmd) throws IOException {
        if (allowed) {
            debug.write(cmd);
            debug.newLine();
            debug.write("-------------");
            debug.newLine();
            debug.flush();
        }
    }