Corrected read/write to Json