Checking for json file before xml