public static void openJMX(File file) {

        FileInputStream reader = null;
        try {

            BmLog.debug("Loading file: " + file);
            reader = new FileInputStream(file);
            HashTree tree = SaveService.loadTree(reader);
            GuiPackage guiPackage = GuiPackage.getInstance();
            guiPackage.setTestPlanFile(file.getAbsolutePath());
            Load.insertLoadedTree(1, tree);

            JMeterTreeModel model = guiPackage.getTreeModel();
            JMeterTreeNode testPlanNode = model.getNodesOfType(TestPlan.class).get(0);
            List<JMeterTreeNode> nodes = Collections.list(testPlanNode.children());
            boolean containsRemoteTestRunner = false;
            for (JMeterTreeNode node : nodes) {
                if (node.getStaticLabel().equals("BlazeMeter")) {
                    containsRemoteTestRunner = true;
                }
                if (node.getStaticLabel().contains("Thread Group")) {
                    List<JMeterTreeNode> subNodes = Collections.list(node.children());
                    for (JMeterTreeNode subNode : subNodes) {
                        if (subNode.getStaticLabel().equals("BlazeMeter")) {
                            containsRemoteTestRunner = true;
                        }
                    }
                }
            }


            if (!containsRemoteTestRunner) {
                TestElement remoteTestRunner = guiPackage.createTestElement(RemoteTestRunnerGui.class, RemoteTestRunner.class);
                model.addComponent(remoteTestRunner, testPlanNode);
            }

        } catch (FileNotFoundException fnfe) {
            BmLog.error("JMX file " + file.getName() + "was not found ", fnfe);
        } catch (IllegalUserActionException iuae) {
            BmLog.error(iuae);
        } catch (Exception exc) {
            BmLog.error(exc);
        }
    }