Added error handling for HotGoal.java