Catch and handle JSON parsing error. Solves #2