Add additional error handling to the new topology code