HUE-2028 [pig] The end of logs can be missing

Adding finished flag in the json