better error logging for date validation