Finding a free port before starting the server