Better error handling when deleting a log & log retention to 28 days.

Also Checking that URLs has value before serialising to prevent it being blanked.