trying a different writeLines and JSON combination