Effect of humidity on the writing speed and domain wall dynamics of ferroelectric domains