Changed json file management by using streams to avoud OutOfMemory
errors