private String readNextLine() throws InvalidCommandException {
        logger.trace("Attempting to read next line");
        if (reader == null) {
            if (!processQueue.isEmpty())
                loadNextReader();
            else
                return null;
        }

        String line = null;
        try {
            while ((line = reader.readLine()) != null && line.isEmpty())
                ;
        } catch (IOException e) {
        }

        logger.detailedTrace("Reading next line: " + line);
        return line;
    }