Provide an option to write the listening port to a file.