Fix crash when json we exported is not valid
Fix new line making command line not work