Refactoring cleanBackups