UPDATING to ensure check only for folder deletion