clear old contents before updating