removed some logging
fixed date check