Check if json isn't output
More error checking