Added a try except on importing json library