edit save_json to added a newline character and added save_text