Output the original content to output file on JSON gneration error

We can see diff by this change on JSON generation error.