Added comments into ErrorCheck