Got it to run to completion. Had to do with freeing resources