Readd JSON command and add error catching