default port and write out to metadata file