Added Error Check By Art Lim