Adding a date field and better error handling

Signed-off-by: Alan Gardner <alan@armoin.com>