serializes data to .pickle files