Added error handling to go blocks.