minor change. Move json sucees string out of the try/catch block