GI-917 CR Change. Use stream to ensure file is closed.