File Cleaning and Add ID Check function