add host by default, and clear buffer before save