Split main function
Logging deleted files