Fixed bug on checkDate and added date error message