Add a test to this function, i.e., write the content_data to memory file and check it integrity.