Improving the is_new_log_or_existing function.
Catching errors when the json content doesnt contain the expected data.