Temporary (but useful) error checking added for segment completion