Fix newline issues with json files at 4096 bytes chunk