Added the clear_folder function.