added missing safeguard when using the stream operator without initializing