"org.openqa.selenium.remote.UnreachableBrowserException" Exception when trying to start appium programmatically with log level debug

Hi Team

I am getting the below issue when trying to start appium programatically with appium log level as debug.

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

I am not seeing this issue when I use the appium log level as error.

PFB for the code I am using

public void startServer() {

    String serverPortValue =  System.getProperty("endpointPortValue");

    //Stopping Existing server if any
    try {
        report("Cleaning up the appium port : " + serverPortValue);
        stopServer();
    }
    catch (Exception e){
        report("Preemptive server stop attempt failed. Ignoring...");
    }
    //Set Capabilities
    // Based of the isScreenShotNeeded property -  screenshot is taken whenever this method is called.
    cap = new DesiredCapabilities();
    cap.setCapability("noReset", "false");
    builder = new AppiumServiceBuilder();
    serverPort = Integer.parseInt(serverPortValue);

    if (System.getProperty("test.platformName") != null && System.getProperty("test.platformName")
            .equals("Android")) {
        cap.setCapability("app","/Users/Shared/Android/Trucker.apk");

    } else if (System.getProperty("test.platformName") != null && System.getProperty("test.platformName")
            .equals("iOS")) {
        cap.setCapability("app","/Users/Shared/Builds/Trucker.ipa");
        cap.setCapability("udid","auto");
    }
    builder.usingPort(serverPort);
    builder.withCapabilities(cap);
    builder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
    builder.withArgument(GeneralServerFlag.LOG_LEVEL,"info:debug");
    builder.withIPAddress("127.0.0.1");

    //Start the server with the builder
    service = AppiumDriverLocalService.buildService(builder);
    report("Starting the Appium Service");
    service.start();

Any leads over this will be helpful.