Edited challenge.js so that it catches non-JSON files without freezing browser