Added keepFile function and updated purge commands for warn files