util: add CloseLog routine to close the server log