Add some error handling to spawn run functions.