Refine core data and remove all files when cannot init core data