Adding java chooseports debug code too