Added error checking for non-json files and wrong viewer/beats file

#59 
I added a try/catch block to catch SyntaxErrors, which appear if the file is not a .json format, and also an if-block which alerts the user if the file is the wrong .json file (viewer/beats). Is this about what we want?
Not a big deal, but in general we should always use === instead of == when possible