Fix exception handling in spout