Fix #111: exit(1) when inputs are not valid JSON