Fix bugs with filestore saving to core data issue