add flag -ap for supporting auto pick available port.