Find an available port to start server and store the port number to an ini file