Works w pickle+small files. Rewriting to JSON