moved cooky n json validation code on the top n now onload script will work only if no issues