Added the method to hold or remove files based on the environments