Check if the json is erroneous

I have seen a bug in which the extraction was erroneous due to which the json
file created had empty fields. And as the json file is already present, it would
not be updated (could check the differences later on). Hence, if erroneous json
file is present, clean it so that it may be updated later.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>