spout update: properly release lock upon error