serialized and saved filtered data to a text file