This patch adds server ports to server state file at the end of each line for backward compatibility.