Fixes a bug in the cleanup process

Old files were partially removed