private void doCommand(String cmd) {
        if (cmd.startsWith("D")) {
            doSleep(Integer.parseInt(cmd.substring(1)));
        }else if(cmd.startsWith("W")){
            doWrite(Integer.parseInt(cmd.substring(1)));
        } else if (cmd.startsWith("X")) {
            doShutdown();
        }else if (cmd.startsWith("R")){
            doRead();
        } else if (cmd.equals("help")) {
            doHelp();
        } else if (cmd.equals("$DONE")) {
            logger.info("DONE ALL OPERATIONS");
        } else {
            logger.info("Bad command: '{}'. Try 'help'", cmd);
        }
    }