Fix error handling process in case of finishing serverspec abnormally.