Better date handeling and logging